Class ForwardedOperationDispatcher
A dispatcher for forwarded operations.
-
ICanBoogie\Module\ForwardedOperationDispatcher
implements
ICanBoogie\HTTP\Dispatcher
Methods summary
public
|
|
public
ICanBoogie\Operation\Response
|
#
__invoke( ICanBoogie\HTTP\Request $request )
Returns
ICanBoogie\Operation\Response
Inheritdoc
|
public
|
#
rescue( Exception $exception, ICanBoogie\HTTP\Request $request )
If the exception in not a Failure instance it is rethrown, otherwise it means
that an exception occurred during control/validate/process or a Failure was thrown
because the response has an error.
If the exception in not a Failure instance it is rethrown, otherwise it means
that an exception occurred during control/validate/process or a Failure was thrown
because the response has an error.
If the request is an XHR we return the response of the operation.
Otherwise, the exception message is logged as an error and no response is returned
so that the actual content of the URL is displayed.
Inheritdoc
|
protected
|
#
assert_forward_is_valid( ICanBoogie\HTTP\Request $request )
Asserts that a forward is valid.
Asserts that a forward is valid.
Parameters
Throws
LogicException if ICanBoogie\Module\Operation::DESTINATION or ICanBoogie\Module\Operation::NAME is
not defined.
|
protected
ICanBoogie\Operation
|
#
resolve_operation( ICanBoogie\HTTP\Request $request )
Resolves an ICanBoogie\Operation instance from forwarded parameters.
Resolves an ICanBoogie\Operation instance from forwarded parameters.
Parameters
Returns
ICanBoogie\Operation
|
protected
callable
|
#
resolve_operation_constructor( string $operation_name, ICanBoogie\Module $module )
Resolves operation constructor.
Resolves operation constructor.
Parameters
Returns
callable
Throws
LogicException If the ICanBoogie\Operation instance cannot be resolved.
|