Documentation

ControllerResolver
in package
implements ControllerResolverInterface

This implementation uses the '_controller' request attribute to determine the controller to execute.

Tags
author

Fabien Potencier fabien@symfony.com

author

Tobias Schultze http://tobion.de

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

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
Tags
throws
InvalidArgumentException

When the controller cannot be created

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

Search results