ControllerReference

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

__construct(string $controller, array $attributes = array(), array $query = array())

Constructor.

Parameters

string $controller The controller name
array $attributes An array of parameters to add to the Request attributes
array $query An array of parameters to add to the Request query string

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.3/Symfony/Component/HttpKernel/Controller/ControllerReference.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部