Exemple #1
0
 /**
  * 构造函数
  * 代理某个具体渲染器的方法
  *
  * @param Leb_Config
  */
 protected function __construct($params = array())
 {
     parent::__construct($params);
     $this->_initConfig();
     $engine = $this->getEnv('engine');
     $engine = isset($engine) && $engine ? $engine : "Leb_View_Stand";
     if (!self::$_engine) {
         $engine_file_name = strtolower(substr($engine, strlen(__CLASS__) + 1)) . '.php';
         require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . $engine_file_name;
         self::$_engine = new $engine();
     }
     if ($this->isAllowLayout()) {
         require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'view/layout.php';
         $this->_layouter = Leb_View_Layout::getInstance();
     }
     self::$_engine->setTemplateSuffix($this->getEnv('suffix'));
 }