src/Routing/PhrouteDispatcher.php
public function dispatch($httpMethod, $uri)
    {
        $result = array();

        try {
            $this->allowed($httpMethod);

            $info = $this->router->retrieve($httpMethod, $uri);

            $result = $this->dispatcher->dispatch($httpMethod, $uri);

            $middlewares = ($result && isset($info[3])) ? $info[3] : array();

            $result = array($result, $middlewares);
        } catch (\Exception $exception) {
            $this->exceptions($exception, $uri);
        }

        return $result;
    }
public function dispatch($httpMethod, $uri)
    {
        $result = array();

        try {
            $this->allowed($httpMethod);

            $info = $this->router->retrieve($httpMethod, $uri);

            $result = $this->dispatcher->dispatch($httpMethod, $uri);

            $middlewares = ($result && isset($info[3])) ? $info[3] : array();

            $result = array($result, $middlewares);
        } catch (\Exception $exception) {
            $this->exceptions($exception, $uri);
        }

        return $result;
    }
public function dispatch ( $ httpMethod , $ uri ) { $ result = array ( ) ; try { $ this -> allowed ( $ httpMethod ) ; $ info = $ this -> router -> retrieve ( $ httpMethod , $ uri ) ; $ result = $ this -> dispatcher -> dispatch ( $ httpMethod , $ uri ) ; $ middlewares = ( $ result && isset ( $ info [ 3 ] ) ) ? $ info [ 3 ] : array ( ) ; $ result = array ( $ result , $ middlewares ) ; } catch ( \ Exception $ exception ) { $ this -> exceptions ( $ exception , $ uri ) ; } return $ result ; }
Dispatches against the provided HTTP method verb and URI.

@param  string $httpMethod
@param  string $uri
@return array|mixed
Dispatches against the provided HTTP method verb and URI .