src/Dispatcher.php
protected function dispatch(InternalRequest $request)
    {
        $this->routeStack[] = $this->router->getCurrentRoute();

        $this->clearCachedFacadeInstance();

        try {
            $this->container->instance('request', $request);

            $response = $this->router->dispatch($request);

            if (! $response->isSuccessful() && ! $response->isRedirection()) {
                throw new InternalHttpException($response);
            }

            if (! $this->raw) {
                $response = $response->getOriginalContent();
            }
        } catch (HttpExceptionInterface $exception) {
            $this->refreshRequestStack();

            throw $exception;
        }

        $this->refreshRequestStack();

        return $response;
    }
protected function dispatch(InternalRequest $request)
    {
        $this->routeStack[] = $this->router->getCurrentRoute();

        $this->clearCachedFacadeInstance();

        try {
            $this->container->instance('request', $request);

            $response = $this->router->dispatch($request);

            if (! $response->isSuccessful() && ! $response->isRedirection()) {
                throw new InternalHttpException($response);
            }

            if (! $this->raw) {
                $response = $response->getOriginalContent();
            }
        } catch (HttpExceptionInterface $exception) {
            $this->refreshRequestStack();

            throw $exception;
        }

        $this->refreshRequestStack();

        return $response;
    }
protected function dispatch ( InternalRequest $ request ) { $ this -> routeStack [ ] = $ this -> router -> getCurrentRoute ( ) ; $ this -> clearCachedFacadeInstance ( ) ; try { $ this -> container -> instance ( 'request' , $ request ) ; $ response = $ this -> router -> dispatch ( $ request ) ; if ( ! $ response -> isSuccessful ( ) && ! $ response -> isRedirection ( ) ) { throw new InternalHttpException ( $ response ) ; } if ( ! $ this -> raw ) { $ response = $ response -> getOriginalContent ( ) ; } } catch ( HttpExceptionInterface $ exception ) { $ this -> refreshRequestStack ( ) ; throw $ exception ; } $ this -> refreshRequestStack ( ) ; return $ response ; }
Attempt to dispatch an internal request.

@param \Dingo\Api\Http\InternalRequest $request

@throws \Exception|\Symfony\Component\HttpKernel\Exception\HttpExceptionInterface

@return mixed
Attempt to dispatch an internal request .