예제 #1
0
 public static function getInstance()
 {
     if (self::$_instance === null) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
예제 #2
0
파일: View.php 프로젝트: gilad1987/picabo
 public function render()
 {
     if ($this->disableView) {
         return;
     }
     if (!$this->isErrorPage) {
         header('Content-Type: text/html; charset=utf-8');
         $this->initParams();
     }
     $this->csrf_token = App_CSRFUtil::getInstance()->getToken(true);
     $this->setPageContent();
     if (!$this->isXmlHttpRequest()) {
         $a = self::ROOT_VIEW . 'Layout/' . strtolower($this->layoutName) . '.phtml';
         require_once self::ROOT_VIEW . 'Layout/' . strtolower($this->layoutName) . '.phtml';
         //        	die();
     } else {
         echo $this->pageContent;
     }
 }