getRequest()函数获得的是Request对象
Zend_Controller_Request_Http
Request对象有几个重要的参数
获取模块名称
$moduleName = $this->getRequest()->getModuleName()
获取控制器名称
$controllerName = $this->getRequest()->getControllerName()
获取动作名称
$actionName = $this->getRequest()->getActionName()
//判断是否是ajax请求
$this->getRequest()->isXmlHttpRequest()
//如果是ajax请求的话,关闭layout
if ($this->getRequest()->isXmlHttpRequest() || $this->getRequest()->getParam('nolayout')){ //$this->getRequest()->isXmlHttpRquest() //判断是否是ajax请求,是关闭layout
$this->getInvokeArg('bootstrap')->getResource('Layout')->disableLayout(); //$this->getInvokeArg('bootstrap')获取 //bootstrap参数列表
//->getResource('Layout')获得 Layout对象
//->disableLayout();屏蔽layout文件
$this->_helper->layout()->disableLayout(); //同上
$this->getHelper(layout)->disableLayout(); //同上
}