关于gotozf学习笔记(11/08/06 12:07)

简介:这是关于goto------zf学习笔记(11/08/06 12:07)的详细页面,介绍了和php,有关的知识、技巧、经验,和一些php源码等。

class='pingjiaF' frameborder='0' src='http://biancheng.dnbcw.info/pingjia.php?id=342963' scrolling='no'>

前几天在项目中看到这句代码:

$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));
    }

爱J2EE关注Java迈克尔杰克逊视频站JSON在线工具

http://biancheng.dnbcw.info/php/342963.html pageNo:6
原文地址:https://www.cnblogs.com/ooooo/p/2243868.html