Orno\Route\Dispatcher::dispatch PHP Метод

dispatch() публичный Метод

Match and dispatch a route matching the given http method and uri
public dispatch ( string $method, string $uri ) : Orno\Http\ResponseInterface
$method string
$uri string
Результат Orno\Http\ResponseInterface
    public function dispatch($method, $uri)
    {
        $match = parent::dispatch($method, $uri);
        switch ($match[0]) {
            case FastRoute\Dispatcher::NOT_FOUND:
                $response = $this->handleNotFound();
                break;
            case FastRoute\Dispatcher::METHOD_NOT_ALLOWED:
                $allowed = (array) $match[1];
                $response = $this->handleNotAllowed($allowed);
                break;
            case FastRoute\Dispatcher::FOUND:
            default:
                $handler = isset($this->routes[$match[1]]['callback']) ? $this->routes[$match[1]]['callback'] : $match[1];
                $strategy = $this->routes[$match[1]]['strategy'];
                $vars = (array) $match[2];
                $response = $this->handleFound($handler, $strategy, $vars);
                break;
        }
        return $response;
    }