aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/Dispatcher.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-03-24 20:55:18 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-03-24 20:55:18 +0100
commitc8aa451c768a3d4dfce3d19648f3c8420dedb74c (patch)
tree9d25dc6fdebd91ab80699f0b8d7fb91788a1ca4b /lib/Minz/Dispatcher.php
parentfd829d75676a07a13a635db037efa92e364026a7 (diff)
Minz: remove url_rewriting
As suggested https://github.com/marienfressinaud/FreshRSS/issues/163#issuecomment-38478669 At the same time, removes a bunch of (almost) dead code such as Minz_Router (the few remaining lines being moved to Minz_FrontController to avoid a class) Contributes to https://github.com/marienfressinaud/FreshRSS/issues/303
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 (