示例#1
0
文件: Action.php 项目: douggr/benri
 /**
  * Initialize object.
  */
 public function init()
 {
     parent::init();
     if ($this->_layout) {
         $this->getHelper('layout')->setLayout($this->_layout);
     }
 }
示例#2
0
文件: Action.php 项目: douggr/benri
 /**
  * Initialize object.
  */
 public function init()
 {
     parent::init();
     Zend_Controller_Front::getInstance()->registerPlugin(new Zend_Controller_Plugin_PutHandler())->registerPlugin(new Benri_Controller_Plugin_CORS())->registerPlugin(new Benri_Controller_Plugin_RequireUserAgentHeader())->registerPlugin(new Benri_Controller_Plugin_OptionsRequest());
     try {
         $this->getHelper('layout')->disableLayout();
     } catch (Zend_Controller_Action_Exception $e) {
         // If the Layout helper isn't enabled, just ignore and continue.
     }
     $this->getHelper('viewRenderer')->setNoRender(true);
     $this->_input = new StdClass();
 }