/** 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; } }
/** Pre dispatch. */ public function preDispatch() { $this->forward('json', 'index', 'api', $this->getAllParams()); parent::preDispatch(); }