Class RescueEvent
Event class for the ICanBoogie\Routing\RouteDispatcher::rescue
event.
Event hooks may use this event to rescue a route by providing a suitable response, or
replace the exception to throw if the rescue fails.
-
ICanBoogie\Event
-
┗
ICanBoogie\Routing\Route\RescueEvent
Methods summary
protected
get_exception( void )
: Exception
protected
set_exception( Exception $exception
)
: Exception
Parameters
Returns
Exception
protected
get_request( void )
: ICanBoogie\HTTP\Request
Returns
ICanBoogie\HTTP\Request
protected
get_response( void )
: ICanBoogie\HTTP\Response|null
Returns
ICanBoogie\HTTP\Response|null
protected
set_response( ICanBoogie\HTTP\Response $response
= null )
public
__construct( ICanBoogie\Routing\Route
$target
, Exception & $exception
, ICanBoogie\HTTP\Request $request
, ICanBoogie\HTTP\Response & $response
= null )
The event is constructed with the type self::TYPE.
The event is constructed with the type self::TYPE.
Parameters
$target
$exception
- Reference to the exception thrown while dispatching the route.
$request
$response
Constants summary
Properties summary
Magic properties
public
$exception
: Exception
public
$response
: ICanBoogie\HTTP\Response|null
public read-only
$request
: ICanBoogie\HTTP\Request