/** * Process result data controller action returned * * @param array $rs * @param Zood_Controller_Action $action */ public function process(array $rs, Zood_Controller_Action $action) { $this->setData($action->getData()); $scriptPath = $this->getScriptPath(); if (empty($scriptPath)) { /** Zood_Config */ require_once 'Zood/Config.php'; $viewConfig = Zood_Config::get('view'); if (isset($viewConfig['script_path'])) { $scriptPath = $viewConfig['script_path']; $this->setScriptPath($scriptPath); } } $script = $this->getScript($rs['resource']); $this->render($script); }
/** * Process result data controller action returned * * @param array $rs * @param Zood_Controller_Action $action */ public function process(array $rs, Zood_Controller_Action $action) { echo json_encode($action->getData()); }
public static function clearInterceptors() { self::$_interceptors = NULL; }
/** * Process result data controller action returned * * @param array $rs * @param Zood_Controller_Action $action */ public function process(array $rs, Zood_Controller_Action $action) { $xml = new Array2Xml(self::$root, self::$listKey, self::$encoding, self::$version); echo $xml->toXml($action->getData()); }
require_once 'Zood/Loader.php'; /** * Register auto load */ Zood_Loader::registerAutoload(); //require_once 'Zend/Registry.php'; //require_once 'Zood/Util.php'; //require_once 'Zood/Controller/Front.php'; /** * Set default configuration dir */ //Zood_Loader::loadClass('Zood_Config'); //Zood_Config::addConfigDirectory(ZOODPP_ROOT . '/app' . '/config'); //Access authentication require_once ZOODPP_ROOT . '/app/lib/access/ActionAccessInterceptor.php'; Zood_Controller_Action::addInterceptor(new ActionAccessInterceptor(), 'access'); /** * Get front controller instance, set controller dir and dispatch */ try { Zood_Controller_Front::getInstance()->setBaseUrl()->setControllerDirectory(ZOODPP_APP . '/controllers')->dispatch(); } catch (Exception $e) { Zood_Util::print_r($e->getMessage(), 'Exception!'); } /** * Execution end time * @var Float */ $endTime = microtime(true); Zood_Util::print_r($endTime - $bootTime, 'Full execution time(sec)'); Zood_Util::print_r(memory_get_usage(), 'memory_get_usage');