我在Kohana用户指南中看到:http://kohanaframework.org/3.0/guide/kohana/mvc/controllers#custom-构造函数
在Custom __construct()函数行中,您可以在构造函数中看到如下参数:
function __construct(Kohana_Request $request)
所以,我们在第一个参数Kohana_Request
中有一个常数。请帮我理解它是什么。
感谢
不是常量,它是一个类型提示:http://www.php.net/manual/en/language.oop5.typehinting.php
$request
应该是类型为Kohana_Request
的对象。