summaryrefslogtreecommitdiff
path: root/app/Core/Router.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Core/Router.php')
-rw-r--r--app/Core/Router.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/app/Core/Router.php b/app/Core/Router.php
index c9af6e2c..1750753c 100644
--- a/app/Core/Router.php
+++ b/app/Core/Router.php
@@ -2,6 +2,8 @@
namespace Core;
+use Pimple\Container;
+
/**
* Router class
*
@@ -27,24 +29,24 @@ class Router
private $action = '';
/**
- * Registry instance
+ * Container instance
*
* @access private
- * @var \Core\Registry
+ * @var Pimple\Container
*/
- private $registry;
+ private $container;
/**
* Constructor
*
* @access public
- * @param Registry $registry Registry instance
- * @param string $controller Controller name
- * @param string $action Action name
+ * @param Pimple\Container $container Container instance
+ * @param string $controller Controller name
+ * @param string $action Action name
*/
- public function __construct(Registry $registry, $controller = '', $action = '')
+ public function __construct(Container $container, $controller = '', $action = '')
{
- $this->registry = $registry;
+ $this->container = $container;
$this->controller = empty($_GET['controller']) ? $controller : $_GET['controller'];
$this->action = empty($_GET['action']) ? $action : $_GET['action'];
}
@@ -81,7 +83,7 @@ class Router
return false;
}
- $instance = new $class($this->registry);
+ $instance = new $class($this->container);
$instance->request = new Request;
$instance->response = new Response;
$instance->session = new Session;