ControllerResolverInterface::getArguments()

array getArguments(Request $request, callable $controller) deprecated deprecated This method is deprecated as of 3.1 and will be removed in 4.0. Please use the {@see ArgumentResolverInterface} instead. Returns the arguments to pass to the controller. Parameters Request $request A Request instance callable $controller A PHP callable Return Value array An array of arguments to pass to the controller Exceptions RuntimeException When value for argument given is not provided

ControllerResolver::getController()

callable|false getController(Request $request) Returns the Controller instance associated with a Request. As several resolvers can exist for a single application, a resolver must return false when it is not able to determine the controller. The resolver must only throw an exception when it should be able to load controller but cannot because of some errors made by the developer. Parameters Request $request A Request instance Return Value callable|false A PHP callable representi

ControllerResolver

class ControllerResolver implements ArgumentResolverInterface, ControllerResolverInterface 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. Methods __construct(LoggerInterface $logger = null) Constructor. callable|false getController(Request $request) Returns the Controller instance associated with a Request. array getArguments(Req

ControllerResolver::getArguments()

array getArguments(Request $request, callable $controller) deprecated deprecated 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. Returns the arguments to pass to the controller. Parameters Request $request callable $controller Return Value array An array of arguments to pass to the controller Exceptions RuntimeException When no value could be provided for a required argument

ControllerResolver

class ControllerResolver extends ControllerResolver ControllerResolver. Methods __construct(ContainerInterface $container, ControllerNameParser $parser, LoggerInterface $logger = null) Constructor. callable|false getController(Request $request) Returns the Controller instance associated with a Request. from ControllerResolver array getArguments(Request $request, callable $controller) deprecated Returns the arguments to pass to the controller. from ControllerResolver Details

ControllerResolverInterface

interface ControllerResolverInterface A ControllerResolverInterface implementation knows how to determine the controller to execute based on a Request object. It can also determine the arguments to pass to the Controller. A Controller can be any valid PHP callable. Methods callable|false getController(Request $request) Returns the Controller instance associated with a Request. array getArguments(Request $request, callable $controller) deprecated Returns the arguments to pass to the

ControllerReference

class ControllerReference Acts as a marker and a data holder for a Controller. Some methods in Symfony accept both a URI (as a string) or a controller as an argument. In the latter case, instead of passing an array representing the controller, you can use an instance of this class. Properties $controller $attributes $query Methods __construct(string $controller, array $attributes = array(), array $query = array()) Constructor. Details __cons

ControllerNameParser::parse()

string parse(string $controller) Converts a short notation a:b:c to a class::method. Parameters string $controller A short notation controller (a:b:c) Return Value string A string in the class::method notation Exceptions InvalidArgumentException when the specified bundle is not enabled or the controller cannot be found

ControllerArgumentValueResolverPass

class ControllerArgumentValueResolverPass implements CompilerPassInterface Gathers and configures the argument value resolvers. Methods process(ContainerBuilder $container) You can modify the container here before it is dumped to PHP code. Details process(ContainerBuilder $container) You can modify the container here before it is dumped to PHP code. Parameters ContainerBuilder $container

ControllerNameParser::build()

string build(string $controller) Converts a class::method notation to a short one (a:b:c). Parameters string $controller A string in the class::method notation Return Value string A short notation controller (a:b:c) Exceptions InvalidArgumentException when the controller is not valid or cannot be found in any bundle