예제 #1
0
 /**
  * Render view
  * @param ZView $a_view
  * @param array $a_data
  * @param bool $a_return
  * @return midex
  */
 private function renderView(ZView &$a_view, $a_return = false)
 {
     $view = $a_view->getView();
     if (file_exists($view)) {
         return $a_view->display($a_return);
     }
     $oldload = $this->getModule()->getLoader();
     if (substr($view, 0, 1) == Zoombi::SS) {
         $view = substr($view, 1);
         $this->getModule()->setLoader(Zoombi::getApplication()->getLoader());
     }
     $a_view->setThis($this);
     if (!file_exists($view)) {
         try {
             $a_view->setView($this->getModule()->getLoader()->view($view));
         } catch (ZViewException $e) {
             $this->getModule()->setLoader($oldload);
             $this->triggerError($e);
             return;
         }
     }
     $o = $a_view->display($a_return);
     $this->getModule()->setLoader($oldload);
     return $o;
 }
예제 #2
0
 /**
  * Render view
  * @param ZView $a_view
  * @param array $a_data
  * @param bool $a_return
  * @return midex
  */
 private function renderView(ZView &$a_view, $a_return = false)
 {
     $a_view->setThis($this);
     $view = $a_view->getView();
     if (!file_exists($view) or !is_file($view)) {
         $nv = $this->getModule()->getLoader()->view($view);
         $a_view->setView($nv);
     }
     try {
         $o = $a_view->display($a_return);
         return $o;
     } catch (ZViewException $e) {
         $this->triggerError($e);
     }
 }