Compare commits

..

6 Commits

Author SHA1 Message Date
Simon Sessingø fd5d893040 Merge pull request #77 from skipperbent/development
[TASK] Added rewrite_uri parameter to Request class
2016-03-19 19:12:42 +01:00
Simon Sessingø 4d58fbf7b5 [TASK] Added rewrite_uri parameter to Request class 2016-03-19 19:14:07 +01:00
Simon Sessingø 35bb58818e [BUGFIX] Readded rendering of groups 2016-03-19 19:00:23 +01:00
Simon Sessingø c1512740af Merge pull request #76 from skipperbent/development
[BUGFIX] Readded rendering of groups
2016-03-19 18:59:01 +01:00
Simon Sessingø 212ae133de Merge pull request #75 from skipperbent/development
[TASK] Readded merging
2016-03-19 17:40:26 +01:00
Simon Sessingø 438d3c258b [TASK] Readded merging 2016-03-19 17:11:54 +01:00
2 changed files with 8 additions and 3 deletions
+7 -2
View File
@@ -27,7 +27,7 @@ class RouterBase {
$this->backStack = array();
$this->controllerUrlMap = array();
$this->baseCsrfVerifier = new BaseCsrfVerifier();
$this->request = new Request();
$this->request = Request::getInstance();
$this->bootManagers = array();
$csrf = new CsrfToken();
@@ -88,7 +88,7 @@ class RouterBase {
$this->currentRoute = $route;
if($route instanceof RouterGroup && $route->matchRoute($this->request) && is_callable($route->getCallback())) {
if($route instanceof RouterGroup && is_callable($route->getCallback())) {
$group = $route;
$route->renderRoute($this->request);
$mergedSettings = array_merge($route->getMergeableSettings(), $settings);
@@ -108,6 +108,8 @@ class RouterBase {
public function routeRequest() {
$originalUri = $this->request->getUri();
// Initialize boot-managers
if(count($this->bootManagers)) {
/* @var $manager RouterBootManager */
@@ -151,6 +153,9 @@ class RouterBase {
$routeNotAllowed = false;
$this->request->rewrite_uri = $this->request->uri;
$this->request->setUri($originalUri);
$this->request->loadedRoute = $route;
$route->loadMiddleware($this->request);
+1 -1
View File
@@ -202,7 +202,7 @@ abstract class RouterEntry {
*/
public function addSettings(array $settings = null) {
if(is_array($settings)) {
$this->settings = array_merge($settings, $this->settings);
$this->settings = array_merge($this->settings, $settings);
}
return $this;
}