therselman 7 years ago
parent
commit
7e6e08586c
  1. 4
      src/Request.php

4
src/Request.php

@ -140,14 +140,14 @@ class Request
return $id; return $id;
} }
public function execute_route() public function execute_route(array $routes)
{ {
$path = $this->uri->path; $path = $this->uri->path;
$paths = explode('/', $path, 4); $paths = explode('/', $path, 4);
$route = null; $route = null;
$method = $this->method; $method = $this->method;
// $this->route = null; // general (debug) information about the matching route // $this->route = null; // general (debug) information about the matching route
$this->routes = $routes = require __DIR__ . '/../config/routes.php'; $this->routes = $routes; // $routes = require __DIR__ . '/../config/routes.php';
// $this->params = null; // $this->params = null;
$controller = $routes['routes'][$paths[1]] ?? $routes[404]; $controller = $routes['routes'][$paths[1]] ?? $routes[404];
// $matches = null; // $matches = null;

Loading…
Cancel
Save