ICanBoogie/Module 3.0.x
  • Namespace
  • Class

Namespaces

  • ICanBoogie
    • Module
      • ModuleCollection
      • Operation

Classes

  • Descriptor
  • ForwardedOperationDispatcher
  • Hooks
  • ModelCollection
  • ModuleCollection
  • ModuleOperationDispatcher
  • ModuleRouteDefinition
  • ModuleTemplateResolver

Traits

  • ControllerBindings
  • CoreBindings
  • ModuleRoute

Exceptions

  • ModuleCollectionInstallFailed
  • ModuleConstructorMissing
  • ModuleIsDisabled
  • ModuleNotDefined

Class ForwardedOperationDispatcher

A dispatcher for forwarded operations.

ICanBoogie\Module\ForwardedOperationDispatcher implements ICanBoogie\HTTP\Dispatcher
Namespace: ICanBoogie\Module
Located at Module/ForwardedOperationDispatcher.php

Methods summary

public
# __construct( ICanBoogie\Module\ModuleCollection $modules )

Parameters

$modules
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

$request

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

$request

Returns

ICanBoogie\Operation
protected callable
# resolve_operation_constructor( string $operation_name, ICanBoogie\Module $module )

Resolves operation constructor.

Resolves operation constructor.

Parameters

$operation_name
$module

Returns

callable

Throws

LogicException
If the ICanBoogie\Operation instance cannot be resolved.
ICanBoogie/Module 3.0.x API documentation generated by ApiGen