Ejemplo n.º 1
0
 /** Before filter */
 public function preDispatch()
 {
     parent::preDispatch();
     $this->apiEnable = true;
     // define api parameters
     $this->apiSetup['apiMethodPrefix'] = $this->Setting->getValueByName(API_METHOD_PREFIX_KEY, $this->moduleName);
     $this->action = $actionName = Zend_Controller_Front::getInstance()->getRequest()->getActionName();
     if ($this->action === 'json') {
         $this->disableLayout();
         $this->_helper->viewRenderer->setNoRender();
         $this->ModuleComponent->Api->controller =& $this;
         $this->ModuleComponent->Api->apiSetup =& $this->apiSetup;
         $this->ModuleComponent->Api->userSession =& $this->userSession;
     }
 }
Ejemplo n.º 2
0
 /** Pre dispatch. */
 public function preDispatch()
 {
     $this->forward('json', 'index', 'api', $this->getAllParams());
     parent::preDispatch();
 }