Development

This commit is contained in:
Simon Sessingø
2016-11-26 10:40:42 +01:00
parent aad11ac581
commit 2c5221051e
8 changed files with 165 additions and 186 deletions
+4 -5
View File
@@ -167,7 +167,7 @@ class Router
$route->renderRoute($this->request);
$this->processingRoute = false;
if ($route->matchRoute($this->request)) {
if ($route->matchRoute($this->request) === true) {
/* Add exception handlers */
if (count($route->getExceptionHandlers()) > 0) {
@@ -220,7 +220,6 @@ class Router
$routeNotAllowed = false;
try {
/* Initialize boot-managers */
if (count($this->bootManagers) > 0) {
@@ -246,7 +245,7 @@ class Router
if ($this->csrfVerifier !== null) {
// Verify csrf token for request
/* Verify csrf token for request */
$this->csrfVerifier->handle($this->request);
}
@@ -261,10 +260,10 @@ class Router
$route = $this->processedRoutes[$i];
/* If the route matches */
if ($route->matchRoute($this->request)) {
if ($route->matchRoute($this->request) === true) {
/* Check if request method matches */
if (count($route->getRequestMethods()) > 0 && in_array($this->request->getMethod(), $route->getRequestMethods()) === false) {
if (count($route->getRequestMethods()) > 0 && in_array($this->request->getMethod(), $route->getRequestMethods(), false) === false) {
$routeNotAllowed = true;
continue;
}