diff options
Diffstat (limited to 'app/Event')
-rw-r--r-- | app/Event/Base.php | 18 | ||||
-rw-r--r-- | app/Event/ProjectActivityListener.php | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/app/Event/Base.php b/app/Event/Base.php index 745871a5..dfeeab55 100644 --- a/app/Event/Base.php +++ b/app/Event/Base.php @@ -2,8 +2,8 @@ namespace Event; +use Pimple\Container; use Core\Listener; -use Core\Registry; use Core\Tool; /** @@ -22,22 +22,22 @@ use Core\Tool; abstract class Base implements Listener { /** - * Registry instance + * Container instance * * @access protected - * @var \Core\Registry + * @var Pimple\Container */ - protected $registry; + protected $container; /** * Constructor * * @access public - * @param \Core\Registry $registry Regsitry instance + * @param Pimple\Container $container */ - public function __construct(Registry $registry) + public function __construct(Container $container) { - $this->registry = $registry; + $this->container = $container; } /** @@ -60,7 +60,7 @@ abstract class Base implements Listener */ public function __get($name) { - return Tool::loadModel($this->registry, $name); + return Tool::loadModel($this->container, $name); } /** @@ -73,7 +73,7 @@ abstract class Base implements Listener */ public function getEventNamespace() { - $event_name = $this->registry->event->getLastTriggeredEvent(); + $event_name = $this->container['event']->getLastTriggeredEvent(); return substr($event_name, 0, strpos($event_name, '.')); } } diff --git a/app/Event/ProjectActivityListener.php b/app/Event/ProjectActivityListener.php index 8958bd2b..75efe65d 100644 --- a/app/Event/ProjectActivityListener.php +++ b/app/Event/ProjectActivityListener.php @@ -27,7 +27,7 @@ class ProjectActivityListener extends Base $values['task']['project_id'], $values['task']['id'], $this->acl->getUserId(), - $this->registry->event->getLastTriggeredEvent(), + $this->container['event']->getLastTriggeredEvent(), $values ); } |