ICanBoogie
  • Documentation
  • API Reference
  • Operation 4.0.x
Namespaces
  • ICanBoogie
    • Operation
Classes
  • BeforeControlEvent
  • BeforeProcessEvent
  • BeforeValidateEvent
  • ControlEvent
  • FailureEvent
  • GetFormEvent
  • Hooks
  • OperationRouteDefinition
  • OperationRouteDispatcher
  • ProcessEvent
  • RescueEvent
  • Response
  • ValidateEvent
Interfaces
  • Exception
Traits
  • ControlEventTrait
  • ValidateEventTrait
Exceptions
  • Failure
  • FormHasExpired
  • FormNotFound

Class OperationRouteDispatcher

Extends the original routing dispatcher to provide extra care for operations.

ICanBoogie\Routing\RouteDispatcher
┗ ICanBoogie\Operation\OperationRouteDispatcher
Namespace: ICanBoogie\Operation
Located at Operation/OperationRouteDispatcher.php

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

$exception
$request

Returns

ICanBoogie\HTTP\Response

Inheritdoc

If the exception is a ICanBoogie\Operation\Failure instance and has a previous exception, it is replaced by that exception.


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

ICanBoogie\Operation\Response

Throws

Exception
protected resolve_operation( ICanBoogie\Operation\Exception & $exception, ICanBoogie\HTTP\Request $request, ICanBoogie\Operation\Failure & $failure = null ) : ICanBoogie\Operation

Resolves the operation from the exception or request's context.

Resolves the operation from the exception or request's context.

Parameters

$exception
$request
$failure

Returns

ICanBoogie\Operation
Operation 4.0.x – Check on GitHub – API documentation generated by ApiGen