src/Core/Application/WebApplication.php
public function dispatch(Request $request, Response $response, $finalHandler = null)
    {
        /** @var AbstractPackage $package */
        $package = $this->getPackage();

        if (!$package) {
            throw new RouteNotFoundException('Can not find package to execute.', 404);
        }

        return $package->execute($request->getAttribute('_controller'), $request, $response);
    }
public function dispatch(Request $request, Response $response, $finalHandler = null)
    {
        /** @var AbstractPackage $package */
        $package = $this->getPackage();

        if (!$package) {
            throw new RouteNotFoundException('Can not find package to execute.', 404);
        }

        return $package->execute($request->getAttribute('_controller'), $request, $response);
    }
public function dispatch ( Request $ request , Response $ response , $ finalHandler = null ) { /** @var AbstractPackage $package */ $ package = $ this -> getPackage ( ) ; if ( ! $ package ) { throw new RouteNotFoundException ( 'Can not find package to execute.' , 404 ) ; } return $ package -> execute ( $ request -> getAttribute ( '_controller' ) , $ request , $ response ) ; }
Method as the Psr7 WebHttpServer handler.

@param  Request  $request      The Psr7 ServerRequest to get request params.
@param  Response $response     The Psr7 Response interface to prepare respond data.
@param  callable $finalHandler The next handler to support middleware pattern.

@return  Response  The returned response object.

@throws \ReflectionException
@throws \Windwalker\DI\Exception\DependencyResolutionException
@since   3.0
Method as the Psr7 WebHttpServer handler .