summaryrefslogtreecommitdiff
path: root/lib/Minz/Dispatcher.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Minz/Dispatcher.php')
-rw-r--r--lib/Minz/Dispatcher.php16
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/Minz/Dispatcher.php b/lib/Minz/Dispatcher.php
index ca1fd1f5c..f62a92911 100644
--- a/lib/Minz/Dispatcher.php
+++ b/lib/Minz/Dispatcher.php
@@ -16,27 +16,19 @@ class Minz_Dispatcher {
private static $instance = null;
private static $needsReset;
- private $router;
private $controller;
/**
* Récupère l'instance du Dispatcher
*/
- public static function getInstance ($router) {
+ public static function getInstance () {
if (self::$instance === null) {
- self::$instance = new Minz_Dispatcher ($router);
+ self::$instance = new Minz_Dispatcher ();
}
return self::$instance;
}
/**
- * Constructeur
- */
- private function __construct ($router) {
- $this->router = $router;
- }
-
- /**
* Lance le controller indiqué dans Request
* Remplit le body de Response à partir de la Vue
* @exception Minz_Exception
@@ -58,7 +50,7 @@ class Minz_Dispatcher {
$this->controller->lastAction ();
if (!self::$needsReset) {
- echo $this->controller->view ()->build ();
+ $this->controller->view ()->build ();
}
} catch (Minz_Exception $e) {
throw $e;
@@ -90,7 +82,7 @@ class Minz_Dispatcher {
Minz_Exception::ERROR
);
}
- $this->controller = new $controller_name ($this->router);
+ $this->controller = new $controller_name ();
if (! ($this->controller instanceof Minz_ActionController)) {
throw new Minz_ControllerNotActionControllerException (