src/Routes/Router.php
public function searchRoute(RequestApplicationInterface $app, $routePath, $method = 'GET', $withInternal = false)
    {
        $dispatcherData = $this->dispatcher->dispatch($method, $routePath);
        if ($dispatcherData[0] === Dispatcher::NOT_FOUND) {
            return [static::ERROR_NOT_FOUND, null, null, []];
        } elseif ($dispatcherData[0] === Dispatcher::METHOD_NOT_ALLOWED) {
            return [static::ERROR_METHOD_NOT_ALLOWED, null, null, []];
        } else {
            $ctrlAndAction = $dispatcherData[1];
            $params = isset($dispatcherData[2]) ? $dispatcherData[2] : [];
            $params = (array)$params;
            return $withInternal || !$dispatcherData[1][0] instanceof ControllerInternalInterface
                ? [static::ERROR_OK, $ctrlAndAction[0], $ctrlAndAction[1], $params]
                : [static::ERROR_NOT_FOUND, null, null, []];
        }
    }
public function searchRoute(RequestApplicationInterface $app, $routePath, $method = 'GET', $withInternal = false)
    {
        $dispatcherData = $this->dispatcher->dispatch($method, $routePath);
        if ($dispatcherData[0] === Dispatcher::NOT_FOUND) {
            return [static::ERROR_NOT_FOUND, null, null, []];
        } elseif ($dispatcherData[0] === Dispatcher::METHOD_NOT_ALLOWED) {
            return [static::ERROR_METHOD_NOT_ALLOWED, null, null, []];
        } else {
            $ctrlAndAction = $dispatcherData[1];
            $params = isset($dispatcherData[2]) ? $dispatcherData[2] : [];
            $params = (array)$params;
            return $withInternal || !$dispatcherData[1][0] instanceof ControllerInternalInterface
                ? [static::ERROR_OK, $ctrlAndAction[0], $ctrlAndAction[1], $params]
                : [static::ERROR_NOT_FOUND, null, null, []];
        }
    }
Search for a given route
@param RequestApplicationInterface $app
@param string                      $routePath
@param string                      $method
@param bool                        $withInternal
@return array