Example #1
0
 /**
  * Déroulement de la liste des routes enregistrées pour matching
  *
  * @return Route
  */
 public function run()
 {
     if (!isset($this->routes[Request::getRequestMethod()])) {
         Response::json404();
     }
     foreach ($this->routes[Request::getRequestMethod()] as $route) {
         if ($route->match(Request::getCurrentUri())) {
             return $route->call();
         }
     }
     Response::json404();
 }