diff options
Diffstat (limited to 'app/Event')
-rw-r--r-- | app/Event/AuthEvent.php | 27 | ||||
-rw-r--r-- | app/Event/AuthFailureEvent.php | 44 | ||||
-rw-r--r-- | app/Event/AuthSuccessEvent.php | 43 | ||||
-rw-r--r-- | app/Event/GenericEvent.php | 2 | ||||
-rw-r--r-- | app/Event/TaskListEvent.php | 11 |
5 files changed, 99 insertions, 28 deletions
diff --git a/app/Event/AuthEvent.php b/app/Event/AuthEvent.php deleted file mode 100644 index 7cbced83..00000000 --- a/app/Event/AuthEvent.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -namespace Kanboard\Event; - -use Symfony\Component\EventDispatcher\Event as BaseEvent; - -class AuthEvent extends BaseEvent -{ - private $auth_name; - private $user_id; - - public function __construct($auth_name, $user_id) - { - $this->auth_name = $auth_name; - $this->user_id = $user_id; - } - - public function getUserId() - { - return $this->user_id; - } - - public function getAuthType() - { - return $this->auth_name; - } -} diff --git a/app/Event/AuthFailureEvent.php b/app/Event/AuthFailureEvent.php new file mode 100644 index 00000000..225ac04a --- /dev/null +++ b/app/Event/AuthFailureEvent.php @@ -0,0 +1,44 @@ +<?php + +namespace Kanboard\Event; + +use Symfony\Component\EventDispatcher\Event as BaseEvent; + +/** + * Authentication Failure Event + * + * @package event + * @author Frederic Guillot + */ +class AuthFailureEvent extends BaseEvent +{ + /** + * Username + * + * @access private + * @var string + */ + private $username = ''; + + /** + * Constructor + * + * @access public + * @param string $username + */ + public function __construct($username = '') + { + $this->username = $username; + } + + /** + * Get username + * + * @access public + * @return string + */ + public function getUsername() + { + return $this->username; + } +} diff --git a/app/Event/AuthSuccessEvent.php b/app/Event/AuthSuccessEvent.php new file mode 100644 index 00000000..38323e82 --- /dev/null +++ b/app/Event/AuthSuccessEvent.php @@ -0,0 +1,43 @@ +<?php + +namespace Kanboard\Event; + +use Symfony\Component\EventDispatcher\Event as BaseEvent; + +/** + * Authentication Success Event + * + * @package event + * @author Frederic Guillot + */ +class AuthSuccessEvent extends BaseEvent +{ + /** + * Authentication provider name + * + * @access private + * @var string + */ + private $authType; + + /** + * Constructor + * + * @access public + * @param string $authType + */ + public function __construct($authType) + { + $this->authType = $authType; + } + + /** + * Get authentication type + * + * @return string + */ + public function getAuthType() + { + return $this->authType; + } +} diff --git a/app/Event/GenericEvent.php b/app/Event/GenericEvent.php index 1129fd16..94a51479 100644 --- a/app/Event/GenericEvent.php +++ b/app/Event/GenericEvent.php @@ -7,7 +7,7 @@ use Symfony\Component\EventDispatcher\Event as BaseEvent; class GenericEvent extends BaseEvent implements ArrayAccess { - private $container = array(); + protected $container = array(); public function __construct(array $values = array()) { diff --git a/app/Event/TaskListEvent.php b/app/Event/TaskListEvent.php new file mode 100644 index 00000000..9be1a7d9 --- /dev/null +++ b/app/Event/TaskListEvent.php @@ -0,0 +1,11 @@ +<?php + +namespace Kanboard\Event; + +class TaskListEvent extends GenericEvent +{ + public function setTasks(array &$tasks) + { + $this->container['tasks'] =& $tasks; + } +} |