diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-11-14 22:44:25 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-11-14 22:44:25 -0500 |
commit | b081288188bb1744c9d7bd075aa5936e0ccbb9c4 (patch) | |
tree | 68008e35eb129f74b9b2a49f6f6076ed02b601c6 /app/Model/Base.php | |
parent | 1487cb27634161ef558c367150213bc7077e4198 (diff) |
Use Pimple instead of Core\Registry and add Monolog for logging
Diffstat (limited to 'app/Model/Base.php')
-rw-r--r-- | app/Model/Base.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/app/Model/Base.php b/app/Model/Base.php index 72d91c3c..5a8d8f1c 100644 --- a/app/Model/Base.php +++ b/app/Model/Base.php @@ -4,7 +4,7 @@ namespace Model; use Core\Event; use Core\Tool; -use Core\Registry; +use Pimple\Container; use PicoDb\Database; /** @@ -58,24 +58,24 @@ abstract class Base public $event; /** - * Registry instance + * Container instance * * @access protected - * @var \Core\Registry + * @var Pimple\Container */ - protected $registry; + protected $container; /** * Constructor * * @access public - * @param \Core\Registry $registry Registry instance + * @param Pimple\Container $container */ - public function __construct(Registry $registry) + public function __construct(Container $container) { - $this->registry = $registry; - $this->db = $this->registry->shared('db'); - $this->event = $this->registry->shared('event'); + $this->container = $container; + $this->db = $this->container['db']; + $this->event = $this->container['event']; } /** @@ -87,7 +87,7 @@ abstract class Base */ public function __get($name) { - return Tool::loadModel($this->registry, $name); + return Tool::loadModel($this->container, $name); } /** |