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.
@author Fabien Potencier <fabien@symfony.com>
Hierarchy
- class \Symfony\Component\HttpKernel\Controller\ControllerReference
Expanded class hierarchy of ControllerReference
See also
9 files declare their use of ControllerReference
- AbstractSurrogateFragmentRenderer.php in vendor/
symfony/ http-kernel/ Fragment/ AbstractSurrogateFragmentRenderer.php - FragmentHandler.php in vendor/
symfony/ http-kernel/ Fragment/ FragmentHandler.php - FragmentRendererInterface.php in vendor/
symfony/ http-kernel/ Fragment/ FragmentRendererInterface.php - FragmentUriGenerator.php in vendor/
symfony/ http-kernel/ Fragment/ FragmentUriGenerator.php - FragmentUriGeneratorInterface.php in vendor/
symfony/ http-kernel/ Fragment/ FragmentUriGeneratorInterface.php
File
-
vendor/
symfony/ http-kernel/ Controller/ ControllerReference.php, line 27
Namespace
Symfony\Component\HttpKernel\ControllerView source
class ControllerReference {
public array $attributes = [];
public array $query = [];
/**
* @param string $controller The controller name
* @param array $attributes An array of parameters to add to the Request attributes
* @param array $query An array of parameters to add to the Request query string
*/
public function __construct(string $controller, array $attributes = [], array $query = []) {
$this->attributes = $attributes;
$this->query = $query;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
ControllerReference::$attributes | public | property | |
ControllerReference::$query | public | property | |
ControllerReference::__construct | public | function |