Zend Controller Action:_redirect()vs getHelper('Redirector') - > gotoUrl()

我读过
$this->getHelper('[helper_name]')
$this->_helper->[helper_name]
更好。我无法找到任何文件的是哪个更好/首选:
$this->_redirect($url)
$this->getHelper('Redirector')->gotoUrl($url)
。     
已邀请:
使用任何适合你的人,他们做同样的事情:
/**
 * Redirect to another URL
 *
 * Proxies to {@link Zend_Controller_Action_Helper_Redirector::gotoUrl()}.
 *
 * @param string $url
 * @param array $options Options to be used when redirecting
 * @return void
 */
protected function _redirect($url, array $options = array())
{
    $this->_helper->redirector->gotoUrl($url, $options);
}
    

要回复问题请先登录注册