ControllerResolver
in package
implements
ControllerResolverInterface
This implementation uses the '_controller' request attribute to determine the controller to execute.
Tags
Interfaces, Classes and Traits
- ControllerResolverInterface
- A ControllerResolverInterface implementation knows how to determine the controller to execute based on a Request object.
Table of Contents
- $logger : mixed
- __construct() : mixed
- getController() : callable|false
- Returns the Controller instance associated with a Request.
- createController() : callable
- Returns a callable for the given controller.
- instantiateController() : object
- Returns an instantiated controller.
- getClassMethodsWithoutMagicMethods() : array<string|int, mixed>
- getControllerError() : string
Properties
$logger
private
mixed
$logger
Methods
__construct()
public
__construct([LoggerInterface|null $logger = null ]) : mixed
Parameters
- $logger : LoggerInterface|null = null
Return values
mixed —getController()
Returns the Controller instance associated with a Request.
public
getController(Request $request) : callable|false
Parameters
- $request : Request
Return values
callable|false —A PHP callable representing the Controller, or false if this resolver is not able to determine the controller
createController()
Returns a callable for the given controller.
protected
createController(string $controller) : callable
Parameters
- $controller : string
Tags
Return values
callable —instantiateController()
Returns an instantiated controller.
protected
instantiateController(string $class) : object
Parameters
- $class : string
Return values
object —getClassMethodsWithoutMagicMethods()
private
getClassMethodsWithoutMagicMethods(mixed $classOrObject) : array<string|int, mixed>
Parameters
- $classOrObject : mixed
Return values
array<string|int, mixed> —getControllerError()
private
getControllerError(mixed $callable) : string
Parameters
- $callable : mixed