Documentation

ContainerControllerResolver extends ControllerResolver
in package

A controller resolver searching for a controller in a psr-11 container when using the "service::method" notation.

Tags
author

Fabien Potencier fabien@symfony.com

author

Maxime Steinhausser maxime.steinhausser@gmail.com

Table of Contents

$container  : mixed
$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
throwExceptionIfControllerWasRemoved()  : mixed

Properties

Methods

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
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
Return values
string

throwExceptionIfControllerWasRemoved()

private throwExceptionIfControllerWasRemoved(string $controller, Throwable $previous) : mixed
Parameters
$controller : string
$previous : Throwable
Return values
mixed

Search results