コード例 #1
0
 /**
  * Add the given route to the arrays of routes.
  *
  * @param \Themosis\Route\Route $route
  * @return void
  */
 protected function addToCollection(Route $route)
 {
     foreach ($route->methods() as $method) {
         static::$routes[$method][$route->condition()][] = $route;
         static::$allRoutes[$method . $route->condition()][] = $route;
     }
 }
コード例 #2
0
 /**
  * Add the given route to the arrays of routes.
  *
  * @param \Themosis\Route\Route $route
  */
 protected function addToCollections($route)
 {
     $domainAndUri = $route->domain() . $route->getUri();
     if ($route->condition() && $route->conditionalParameters()) {
         $domainAndUri .= serialize($route->conditionalParameters());
     }
     foreach ($route->methods() as $method) {
         $this->routes[$method][$domainAndUri] = $route;
     }
     $this->allRoutes[$method . $domainAndUri] = $route;
 }