respondsTo() public method

If no method is provided, returns array of all methods to which this route will respond.
public respondsTo ( null | string $method = null ) : array | boolean
$method null | string
return array | boolean
Example #1
0
File: App.php Project: phly/phlyty
 /**
  * Determine what methods a route responds to
  *
  * @param  Route $route
  * @param  int   $index
  */
 protected function registerRouteMethods(Route $route, $index)
 {
     foreach ($route->respondsTo() as $method) {
         if (!isset($this->routesByMethod[$method])) {
             $this->routesByMethod[$method] = [];
         }
         $this->routesByMethod[$method][$index] = $route;
     }
 }