Phprest\Router\RouteCollection::addRoute PHP Method

addRoute() public method

Add a route to the collection.
public addRoute ( string $method, string $route, string | Closure $handler, League\Route\Strategy\StrategyInterface $strategy = null ) : RouteCollection
$method string
$route string
$handler string | Closure
$strategy League\Route\Strategy\StrategyInterface
return RouteCollection
    public function addRoute($method, $route, $handler, StrategyInterface $strategy = null)
    {
        parent::addRoute($method, $route, $handler, $strategy);
        $this->routingTable[] = ['method' => $method, 'route' => $route, 'handler' => $handler];
        return $this;
    }