/** * Override the Zend_Controller_Action's constructor (which is called * at the very beginning of this function anyway). * * @param object $request See Parent class constructer * @param object $response See Parent class constructer * @param object $invokeArgs See Parent class constructer */ public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = null) { // call the parent's version where all the Zend magic happens parent::__construct($request, $response, $invokeArgs); $errorHandler = $this->getFrontController()->getPlugin('Zend_Controller_Plugin_ErrorHandler'); $errorHandler->setErrorHandlerModule('apiv1'); $errorHandler->setErrorHandlerController('error'); $errorHandler->setErrorHandlerAction('error'); }
/** * Override the Zend_Controller_Action's constructor (which is called * at the very beginning of this function anyway). * * * @param object $request See Parent class constructor * @param object $response See Parent class constructor * @param object $invokeArgs See Parent class constructor */ public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = null) { // call the parent's version where all the Zend magic happens parent::__construct($request, $response, $invokeArgs); // load device / node array if (is_readable(APPLICATION_PATH . '/configs/devices.ini')) { $this->_devices = new Zend_Config_Ini(APPLICATION_PATH . '/configs/devices.ini'); $this->view->devices_ini = $this->_devices; $this->view->_devices = $this->_devices->devices; } }
/** * Override the Zend_Controller_Action's constructor (which is called * at the very beginning of this function anyway). * * @param object $request See Parent class constructer * @param object $response See Parent class constructer * @param object $invokeArgs See Parent class constructer */ public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = null) { // call the parent's version where all the Zend magic happens parent::__construct($request, $response, $invokeArgs); // we need this for access to class constants in the template $this->view->registerClass('USER', '\\Entities\\User'); $this->view->registerClass('CUSTOMER', '\\Entities\\Customer'); $this->view->registerClass('SWITCHPORT', '\\Entities\\SwitchPort'); $this->view->registerClass('VLAN', '\\Entities\\Vlan'); $this->view->resellerMode = $this->resellerMode(); $this->view->multiIXP = $this->multiIXP(); $this->view->as112UiActive = $this->as112UiActive(); if ($this->getAuth()->hasIdentity() && $this->getUser()->getPrivs() == Entities\User::AUTH_SUPERUSER) { $this->superUserSetup(); } }
/** * Override the OSS_Controller_Action's constructor (which is called * at the very beginning of this function anyway). * * @param object $request See Parent class constructor * @param object $response See Parent class constructor * @param object $invokeArgs See Parent class constructor */ public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = null) { // call the parent's version where all the Zend magic happens parent::__construct($request, $response, $invokeArgs); // if we issue a redirect, we want it to exit immediatly $this->getHelper('Redirector')->setExit(true); // SECURITY and other stuff for logged in users if ($this->getAuth()->hasIdentity()) { // version check $this->checkVersion(); // SECURITY and load objects if ($aid = $this->getParam('aid', false)) { $this->_targetAdmin = $this->loadAdmin($aid); } if ($did = $this->getParam('did', false)) { $this->_domain = $this->loadDomain($did); } if ($mid = $this->getParam('mid', false)) { $this->_mailbox = $this->loadMailbox($mid); } if ($alid = $this->getParam('alid', false)) { $this->_alias = $this->loadAlias($alid); } if ($arid = $this->getParam('arid', false)) { $this->_archive = $this->loadArchive($arid); } } }
/** * Override the OSS_Controller_Action's constructor (which is called * at the very beginning of this function anyway). * * @param object $request See Parent class constructor * @param object $response See Parent class constructor * @param object $invokeArgs See Parent class constructor */ public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = null) { parent::__construct($request, $response, $invokeArgs); }
/** * Override the Zend_Controller_Action's constructor (which is called * at the very beginning of this function anyway). * * @param object $request See Parent class constructer * @param object $response See Parent class constructer * @param object $invokeArgs See Parent class constructer */ public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = null) { // call the parent's version where all the Zend magic happens parent::__construct($request, $response, $invokeArgs); }