ICanBoogie
  • Documentation
  • API Reference
  • Routing 4.0.x
Namespaces
  • ICanBoogie
    • Routing
      • Controller
      • Route
      • RouteDispatcher
Classes
  • ActionEvent
  • BeforeActionEvent
Traits
  • ActionTrait

Trait ActionTrait

Action controller implementation.

Namespace: ICanBoogie\Routing\Controller
Located at Controller/ActionTrait.php

Methods summary

protected get_action( void ) : string

Returns the action being executed.

Returns the action being executed.

Returns

string
protected action( ICanBoogie\HTTP\Request $request ) : ICanBoogie\HTTP\Response|mixed

Dispatch the request to the appropriate method.

Dispatch the request to the appropriate method.

The $request property is initialized.

Parameters

$request

Returns

ICanBoogie\HTTP\Response|mixed
protected resolve_action( ICanBoogie\HTTP\Request $request ) : callable

Resolves the action into a callable.

Resolves the action into a callable.

Parameters

$request

Returns

callable
protected resolve_action_method( string $action, ICanBoogie\HTTP\Request $request ) : string

Resolves the method associated with the action.

Resolves the method associated with the action.

Parameters

$action
Action name.
$request

Returns

string
The method name.
protected resolve_action_args( string $action, ICanBoogie\HTTP\Request $request ) : array

Resolves the arguments associated with the action.

Resolves the arguments associated with the action.

Parameters

$action
Action name.
$request

Returns

array
The arguments for the action.

Properties summary

Magic properties

public read-only $route : ICanBoogie\Routing\Route
public read-only $action : string

The action being executed.

Routing 4.0.x – Check on GitHub – API documentation generated by ApiGen