Trait ActionTrait
Action controller implementation.
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
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
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
$action
: string
The action being executed.