Class OperationRouteDispatcher
Extends the original routing dispatcher to provide extra care for operations.
-
ICanBoogie\Routing\RouteDispatcher
-
┗
ICanBoogie\Operation\OperationRouteDispatcher
Methods summary
protected
alter_params( ICanBoogie\Routing\Route $route
, ICanBoogie\HTTP\Request $request
, array $captured
)
Inheritdoc
Translates request path parameters using the route's param_translation_list
property.
public
rescue( ICanBoogie\Operation\Exception
$exception
, ICanBoogie\HTTP\Request $request
)
: ICanBoogie\HTTP\Response
Parameters
Returns
ICanBoogie\HTTP\Response
Inheritdoc
protected
rescue_operation( ICanBoogie\Operation\Exception
$exception
, ICanBoogie\HTTP\Request $request
, ICanBoogie\Operation
$operation
, ICanBoogie\Operation\Failure
$failure
= null )
: ICanBoogie\Operation\Response
Rescues an operation that raised an exception.
Rescues an operation that raised an exception.
A ICanBoogie\Operation\RescueEvent
is fired to allow event hooks to replace the exception or provide
a response.
- If a response is provided it is returned.
- If the original exception is not a failure it is re-thrown.
- If the request is an XHR the response of the operation is returned as is.
- Otherwise, the exception is re-thrown.
Parameters
$exception
$request
$operation
$failure
Returns
Throws
Exception