Class Dispatcher
Dispatches HTTP requests.
Events
ICanBoogie\HTTP\Dispatcher::dispatch:before
of classICanBoogie\HTTP\Dispatcher\BeforeDispatchEvent
.ICanBoogie\HTTP\Dispatcher::dispatch
of classICanBoogie\HTTP\Dispatcher\DispatchEvent
.ICanBoogie\HTTP\Dispatcher::rescue
of classICanBoogie\Exception\RescueEvent
.
- ICanBoogie\HTTP\Dispatcher implements ArrayAccess, IteratorAggregate, ICanBoogie\HTTP\DispatcherInterface
Methods summary
public
__construct( array $dispatchers
= [] )
Initializes the ICanBoogie\HTTP\Dispatcher::$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\DispatcherInterface
$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.