summaryrefslogtreecommitdiff
path: root/app/Event/Base.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-11-14 22:44:25 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-11-14 22:44:25 -0500
commitb081288188bb1744c9d7bd075aa5936e0ccbb9c4 (patch)
tree68008e35eb129f74b9b2a49f6f6076ed02b601c6 /app/Event/Base.php
parent1487cb27634161ef558c367150213bc7077e4198 (diff)
Use Pimple instead of Core\Registry and add Monolog for logging
Diffstat (limited to 'app/Event/Base.php')
-rw-r--r--app/Event/Base.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/Event/Base.php b/app/Event/Base.php
index 745871a5..5381471a 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;
/**
@@ -25,19 +25,19 @@ abstract class Base implements Listener
* Registry 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, '.'));
}
}