4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\HttpKernel\Controller;
14 use Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface;
17 * Acts as a marker and a data holder for a Controller.
19 * Some methods in Symfony accept both a URI (as a string) or a controller as
20 * an argument. In the latter case, instead of passing an array representing
21 * the controller, you can use an instance of this class.
23 * @author Fabien Potencier <fabien@symfony.com>
25 * @see FragmentRendererInterface
27 class ControllerReference
30 public $attributes = array();
31 public $query = array();
36 * @param string $controller The controller name
37 * @param array $attributes An array of parameters to add to the Request attributes
38 * @param array $query An array of parameters to add to the Request query string
40 public function __construct($controller, array $attributes = array(), array $query = array())
42 $this->controller = $controller;
43 $this->attributes = $attributes;
44 $this->query = $query;