您的位置:首页 > 编程语言 > Go语言

关于goto------zf学习笔记(11/08/06 12:07)

2011-08-06 12:14 295 查看
前几天在项目中看到这句代码:

$this->getHelper('redirector')->goto('login', 'account');


找遍了rediretor.php 也找不到goto方法,最后发现原来是在__call中。goto原来就是gotoSimple,呵呵~~

public function __call($method, $args)
{
$method = strtolower($method);
if ('goto' == $method) {
return call_user_func_array(array($this, 'gotoSimple'), $args);
}
if ('setgoto' == $method) {
return call_user_func_array(array($this, 'setGotoSimple'), $args);
}
if ('gotoandexit' == $method) {
return call_user_func_array(array($this, 'gotoSimpleAndExit'), $args);
}

require_once 'Zend/Controller/Action/Exception.php';
throw new Zend_Controller_Action_Exception(sprintf('Invalid method "%s" called on redirector', $method));
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: