public function addRoute($method, $route, $handler, $strategy = self::REQUEST_RESPONSE_STRATEGY)
{
// are we running a single strategy for the collection?
$strategy = isset($this->strategy) ? $this->strategy : $strategy;
// if the handler is an anonymous function, we need to store it for later use
// by the dispatcher, otherwise we just throw the handler string at FastRoute
if ($handler instanceof \Closure) {
$callback = $handler;
$handler = uniqid('orno::route::', true);
$this->routes[$handler]['callback'] = $callback;
}
$this->routes[$handler]['strategy'] = $strategy;
$route = $this->parseRouteString($route);
parent::addRoute($method, $route, $handler);
return $this;
}