PHP Class Symfony\Component\HttpKernel\Controller\ControllerResolver

This implementation uses the '_controller' request attribute to determine the controller to execute and uses the request attributes to determine the controller method arguments.
Author: Fabien Potencier ([email protected])
Inheritance: implements Symfony\Component\HttpKernel\Controller\ControllerResolverInterface
Afficher le fichier Open project: symfony/symfony Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Psr\Log\LoggerInterface $logger = null ) Constructor.
getArguments ( Request $request, $controller )
getController ( Request $request )

Méthodes protégées

Méthode Description
createController ( string $controller ) : callable Returns a callable for the given controller.
doGetArguments ( Request $request, callable $controller, array $parameters ) : array
instantiateController ( string $class ) : object Returns an instantiated controller.

Private Methods

Méthode Description
getControllerError ( $callable )

Method Details

__construct() public méthode

Constructor.
public __construct ( Psr\Log\LoggerInterface $logger = null )
$logger Psr\Log\LoggerInterface A LoggerInterface instance

createController() protected méthode

Returns a callable for the given controller.
protected createController ( string $controller ) : callable
$controller string A Controller string
Résultat callable A PHP callable

doGetArguments() protected méthode

Deprecation: This method is deprecated as of 3.1 and will be removed in 4.0. Implement the ArgumentResolverInterface and inject it in the HttpKernel instead.
protected doGetArguments ( Request $request, callable $controller, array $parameters ) : array
$request Symfony\Component\HttpFoundation\Request
$controller callable
$parameters array
Résultat array The arguments to use when calling the action

getArguments() public méthode

Deprecation: This method is deprecated as of 3.1 and will be removed in 4.0. Implement the ArgumentResolverInterface and inject it in the HttpKernel instead.
public getArguments ( Request $request, $controller )
$request Symfony\Component\HttpFoundation\Request

getController() public méthode

This method looks for a '_controller' request attribute that represents the controller name (a string like ClassName::MethodName).
public getController ( Request $request )
$request Symfony\Component\HttpFoundation\Request

instantiateController() protected méthode

Returns an instantiated controller.
protected instantiateController ( string $class ) : object
$class string A class name
Résultat object