Autarky\Routing\Router::getDispatcher PHP Method

getDispatcher() protected method

protected getDispatcher ( )
    protected function getDispatcher()
    {
        if ($this->dispatchData !== null) {
            $dispatchData = $this->dispatchData;
        } else {
            if ($this->routeCollector !== null) {
                $dispatchData = $this->generateDispatchData();
            } else {
                throw new \RuntimeException('No dispatch data or route collector set');
            }
        }
        return new Dispatcher($dispatchData);
    }