Exemplo n.º 1
0
 /**
  * @return \Nano\Route\Common|null
  * @param string $method
  * @param string $location
  */
 protected function findRoute($method, $location)
 {
     if (!$this->routes->offsetExists($method)) {
         return null;
     }
     foreach ($this->routes->offsetGet($method) as $route) {
         if ($route->match($location)) {
             $route->addParams($this->params);
             return $route;
         }
     }
     return null;
 }