CakeFest 2024: The Official CakePHP Conference

Yaf_Request_Abstract::setControllerName

(Yaf >=1.0.0)

Yaf_Request_Abstract::setControllerName设置控制器名

说明

public Yaf_Request_Abstract::setControllerName(string $controller, bool $format_name = true): void

set controller name to request, this is usually used by custom router to set route result controller name.

参数

controller

string,controller 名,应该是骆驼样式,比如“Index”或“Foo_Bar”

format_name

在 Yaf 3.2.0 中引入,Yaf 默认会将名称格式化为骆驼样式,如果设置为 false,Yaf 将设置原始名称来请求。

返回值

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top