public function invoke($route) {
        if ($route instanceof IRoute) {
            return $this->invokeRoute($route);
        }

        return new HttpResponse(HttpStatusCode::NOT_FOUND);
    }
public function invoke($route) {
        if ($route instanceof IRoute) {
            return $this->invokeRoute($route);
        }

        return new HttpResponse(HttpStatusCode::NOT_FOUND);
    }
public function invoke ( $ route ) { if ( $ route instanceof IRoute ) { return $ this -> invokeRoute ( $ route ) ; } return new HttpResponse ( HttpStatusCode :: NOT_FOUND ) ; }
Invoke given route. If the route is null, returns a 404 response.

@param IRoute $route

@return IHttpResponse
@throws InvalidRouteValue
Invoke given route . If the route is null returns a 404 response .