RouteActions
in package
Class RouteActions.
Table of Contents
- __call() : mixed
- afterAction() : mixed
- Runs just after the class action method and before the destructor.
- beforeAction() : mixed
- Runs just before the class action method and after the constructor.
Methods
__call()
public
__call(string $method, array<int, mixed> $arguments) : mixed
Parameters
- $method : string
- $arguments : array<int, mixed>
Return values
mixed —afterAction()
Runs just after the class action method and before the destructor.
protected
afterAction(string $method, array<int, string> $arguments, bool $ran, mixed $result) : mixed
Used to finalize settings, filter output data, acts as a middleware between the action method and the final response.
Parameters
- $method : string
-
The action method name
- $arguments : array<int, string>
-
The action method arguments
- $ran : bool
-
Indicates if the class action method was executed, true if it was not intercepted by the beforeAction method
- $result : mixed
-
The returned value directly from beforeAction or from the class action method, if it was executed
Tags
Return values
mixed —beforeAction()
Runs just before the class action method and after the constructor.
protected
beforeAction(string $method, array<int, string> $arguments) : mixed
Used to prepare settings, filter input data, acts as a middleware between the routing and the class action method.
Parameters
- $method : string
-
The action method name
- $arguments : array<int, string>
-
The action method arguments
Return values
mixed —Returns a response (any value, except null) to prevent the route action execution or null to continue the process and call the action method