summaryrefslogtreecommitdiff
path: root/app/Controller/Base.php
diff options
context:
space:
mode:
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();
}
/**