summaryrefslogtreecommitdiff
path: root/app/Event
diff options
context:
space:
mode:
authorGerardo Zamudio <gerardozamudio@users.noreply.github.com>2016-02-24 23:48:50 -0600
committerGerardo Zamudio <gerardozamudio@users.noreply.github.com>2016-02-24 23:48:50 -0600
commite4de6b3898b64b26d29aff31f21df5fda8055686 (patch)
tree575f8a65440f291d70a070d168eafca8c82a6459 /app/Event
parentd9ffbea174ea6524d0a22f8375ca8b3aa04a3c96 (diff)
parenta6540bc604c837d92c9368540c145606723e97f7 (diff)
Merge pull request #1 from fguillot/master
Update from upstream
Diffstat (limited to 'app/Event')
-rw-r--r--app/Event/AuthEvent.php27
-rw-r--r--app/Event/AuthFailureEvent.php44
-rw-r--r--app/Event/AuthSuccessEvent.php43
-rw-r--r--app/Event/GenericEvent.php2
-rw-r--r--app/Event/TaskListEvent.php11
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;
+ }
+}