Class RequestDispatcher
Dispatches HTTP requests.
Events
ICanBoogie\HTTP\RequestDispatcher::dispatch:beforeof classICanBoogie\HTTP\RequestDispatcher\BeforeDispatchEvent.ICanBoogie\HTTP\RequestDispatcher::dispatchof classICanBoogie\HTTP\RequestDispatcher\DispatchEvent.ICanBoogie\HTTP\RequestDispatcher::rescueof classICanBoogie\Exception\RescueEvent.
- ICanBoogie\HTTP\RequestDispatcher implements ArrayAccess, IteratorAggregate, ICanBoogie\HTTP\Dispatcher
Methods summary
public
__construct( array $dispatchers = [] )
Initializes the ICanBoogie\HTTP\RequestDispatcher::$dispatchers property.
public
__invoke( ICanBoogie\HTTP\Request $request )
: ICanBoogie\HTTP\Response
Dispatches the request to retrieve a ICanBoogie\HTTP\Response.
protected
dispatch( ICanBoogie\HTTP\Request $request )
: ICanBoogie\HTTP\Response
Dispatches a request using the defined dispatchers.
protected
dispatch_with_dispatcher( ICanBoogie\HTTP\Dispatcher $dispatcher, ICanBoogie\HTTP\Request $request )
: ICanBoogie\HTTP\Response
Dispatches the request using a dispatcher.
public
rescue( ICanBoogie\HTTP\Exception $exception, ICanBoogie\HTTP\Request $request )
: ICanBoogie\HTTP\Response
Tries to get a ICanBoogie\HTTP\Response object from an exception.
protected
alter_response_with_exception( ICanBoogie\HTTP\Response $response, ICanBoogie\HTTP\Exception $exception )
Alters a response with an exception.