Example #1
0
 /**
  * Called before Zend_Controller_Front exits its dispatch loop.
  *
  * @return void
  */
 public function dispatchLoopShutdown()
 {
     if ($this->_enabled) {
         foreach ($this->_scriptPaths as $scriptPath) {
             $this->_view->addScriptPath($scriptPath);
         }
         $this->_view->assign($this->_vars);
         if ($this->_view instanceof System_View_Xslt) {
             // autoinclude file if suport
             if (isset($this->_config)) {
                 if (isset($this->_config->layout)) {
                     $this->_view->addInclude((string) $this->_config->layout);
                 }
                 $inflector = $this->getInflector();
                 $inflector->setTarget($this->_options['includeFile']);
                 foreach ($this->getRequestPoll($this->_config) as $request) {
                     $this->_view->addInclude($this->getInflector()->filter(array($request->getModuleKey() => $request->getModuleName(), $request->getControllerKey() => $request->getControllerName(), $request->getActionKey() => $request->getActionName())));
                 }
             }
         }
         $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
         $viewRenderer->setView($this->_view);
         $viewRenderer->renderScript($this->_scriptName);
     }
 }