PHP Class Dietcube\Dispatcher

显示文件 Open project: mercari/dietcube Class Usage Examples

Protected Properties

Property Type Description
$app Application
$container Pimple\Container
$event_dispatcher Symfony\Component\EventDispatcher\EventDispatcher

Public Methods

Method Description
__construct ( Application $app )
boot ( )
executeAction ( $handler, $vars = [], $fire_events = true )
getEnv ( $env = 'production' )
handleError ( Exception $errors ) : Response
handleRequest ( ) : Response
invoke ( $app_class, $app_root_dir, $env )

Protected Methods

Method Description
bootGlobals ( )
createRenderer ( )
detectErrorAction ( Exception $errors )
dispatchRouter ( $method, $path ) : array Dispatch router with HTTP request information.
filterResponse ( Response $response ) : Response Dispatch FILTER_RESPONSE event to filter response.
finishRequest ( Response $response ) : Response Finish request and send response.
getErrorController ( )
prepareResponse ( ) : Response

Method Details

__construct() public method

public __construct ( Application $app )
$app Application

boot() public method

public boot ( )

bootGlobals() protected method

protected bootGlobals ( )

createRenderer() protected method

protected createRenderer ( )

detectErrorAction() protected method

protected detectErrorAction ( Exception $errors )
$errors Exception

dispatchRouter() protected method

Dispatch router with HTTP request information.
protected dispatchRouter ( $method, $path ) : array
$method
$path
return array

executeAction() public method

public executeAction ( $handler, $vars = [], $fire_events = true )

filterResponse() protected method

Dispatch FILTER_RESPONSE event to filter response.
protected filterResponse ( Response $response ) : Response
$response Response
return Response

finishRequest() protected method

Finish request and send response.
protected finishRequest ( Response $response ) : Response
$response Response
return Response

getEnv() public static method

public static getEnv ( $env = 'production' )

getErrorController() protected method

protected getErrorController ( )

handleError() public method

public handleError ( Exception $errors ) : Response
$errors Exception
return Response

handleRequest() public method

public handleRequest ( ) : Response
return Response

invoke() public static method

public static invoke ( $app_class, $app_root_dir, $env )

prepareResponse() protected method

protected prepareResponse ( ) : Response
return Response

Property Details

$app protected_oe property

protected Application,dietcube $app
return Application

$container protected_oe property

protected Container,Pimple $container
return Pimple\Container

$event_dispatcher protected_oe property

protected EventDispatcher,Symfony\Component\EventDispatcher $event_dispatcher
return Symfony\Component\EventDispatcher\EventDispatcher