mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 21:02:15 +00:00
@@ -89,7 +89,7 @@ class Input {
|
|||||||
return ($key !== null && isset($item->getValue()[$key])) ? $item->getValue()[$key] : $item->getValue();
|
return ($key !== null && isset($item->getValue()[$key])) ? $item->getValue()[$key] : $item->getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
return ($item->getValue() === null) ? $default : $item->getValue();
|
return (trim($item->getValue()) === '') ? $default : $item->getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $default;
|
return $default;
|
||||||
|
|||||||
@@ -111,13 +111,6 @@ class RouterBase {
|
|||||||
|
|
||||||
$originalUri = $this->request->getUri();
|
$originalUri = $this->request->getUri();
|
||||||
|
|
||||||
// Load group middlewares
|
|
||||||
|
|
||||||
/* @var $middleware RouterEntry */
|
|
||||||
foreach($this->middlewaresToLoad as $middleware) {
|
|
||||||
$middleware->loadMiddleware($this->request);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialize boot-managers
|
// Initialize boot-managers
|
||||||
if(count($this->bootManagers)) {
|
if(count($this->bootManagers)) {
|
||||||
/* @var $manager RouterBootManager */
|
/* @var $manager RouterBootManager */
|
||||||
@@ -138,6 +131,12 @@ class RouterBase {
|
|||||||
// Loop through each route-request
|
// Loop through each route-request
|
||||||
$this->processRoutes($this->routes);
|
$this->processRoutes($this->routes);
|
||||||
|
|
||||||
|
// Load group middlewares
|
||||||
|
/* @var $route RouterEntry */
|
||||||
|
foreach($this->middlewaresToLoad as $route) {
|
||||||
|
$route->loadMiddleware($this->request);
|
||||||
|
}
|
||||||
|
|
||||||
$routeNotAllowed = false;
|
$routeNotAllowed = false;
|
||||||
|
|
||||||
// Make sure routes with longer urls are rendered first
|
// Make sure routes with longer urls are rendered first
|
||||||
@@ -309,7 +308,7 @@ class RouterBase {
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function processUrl($route, $method = null, $parameters = null, $getParams = null) {
|
protected function processUrl(RouterRoute $route, $method = null, $parameters = null, $getParams = null) {
|
||||||
|
|
||||||
$domain = '';
|
$domain = '';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user