Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\HttpKernel\Controller; Chris@0: Chris@0: use Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface; Chris@0: Chris@0: /** Chris@0: * Acts as a marker and a data holder for a Controller. Chris@0: * Chris@0: * Some methods in Symfony accept both a URI (as a string) or a controller as Chris@0: * an argument. In the latter case, instead of passing an array representing Chris@0: * the controller, you can use an instance of this class. Chris@0: * Chris@0: * @author Fabien Potencier Chris@0: * Chris@0: * @see FragmentRendererInterface Chris@0: */ Chris@0: class ControllerReference Chris@0: { Chris@0: public $controller; Chris@17: public $attributes = []; Chris@17: public $query = []; Chris@0: Chris@0: /** Chris@0: * @param string $controller The controller name Chris@0: * @param array $attributes An array of parameters to add to the Request attributes Chris@0: * @param array $query An array of parameters to add to the Request query string Chris@0: */ Chris@17: public function __construct($controller, array $attributes = [], array $query = []) Chris@0: { Chris@0: $this->controller = $controller; Chris@0: $this->attributes = $attributes; Chris@0: $this->query = $query; Chris@0: } Chris@0: }