|
用的hook['pre_controller']:如下
$hook['pre_controller'][] = array(
'class' => 'Auth_filter',
'function' => 'before',
'filename' => 'Auth_filter.php',
'filepath' => 'hooks',
'params' => array()
);
钩子是:
class Auth_filter
{
function before($class = null, $method = null)
{
$obj =& get_instance();
var_dump($obj);//结果是NULL
}
}
这里不能用get_instance,谁能解决这个问题吗? |
|