summaryrefslogtreecommitdiff
path: root/app/Controller/Base.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-08-15 17:23:41 -0700
committerFrédéric Guillot <fred@kanboard.net>2014-08-15 17:23:41 -0700
commit9eeded33f68872515954a2fc177fcb47a9273ae9 (patch)
treef3ef9507e087ca6bf3ce624232da240a8689b051 /app/Controller/Base.php
parentc539bdc8ab746c5afd48cf87de057dc38d50adac (diff)
Add email notifications
Diffstat (limited to 'app/Controller/Base.php')
-rw-r--r--app/Controller/Base.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/Controller/Base.php b/app/Controller/Base.php
index 7b1cfd85..11841e09 100644
--- a/app/Controller/Base.php
+++ b/app/Controller/Base.php
@@ -2,6 +2,7 @@
namespace Controller;
+use Core\Tool;
use Core\Registry;
use Core\Security;
use Core\Translator;
@@ -24,6 +25,7 @@ use Model\LastLogin;
* @property \Model\GitHub $gitHub
* @property \Model\LastLogin $lastLogin
* @property \Model\Ldap $ldap
+ * @property \Model\Notification $notification
* @property \Model\Project $project
* @property \Model\RememberMe $rememberMe
* @property \Model\ReverseProxyAuth $reverseProxyAuth
@@ -93,9 +95,7 @@ abstract class Base
*/
public function __get($name)
{
- $class = '\Model\\'.ucfirst($name);
- $this->registry->$name = new $class($this->registry->shared('db'), $this->registry->shared('event'));
- return $this->registry->shared($name);
+ return Tool::loadModel($this->registry, $name);
}
/**
@@ -157,6 +157,7 @@ abstract class Base
$this->action->attachEvents();
$this->project->attachEvents();
$this->webhook->attachEvents();
+ $this->notification->attachEvents();
}
/**