Example #1
0
 /**
  * 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);
 }
Example #2
0
 /**
  * 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());
 }
Example #3
0
 /**
  * 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());
 }