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