예제 #1
0
 /**
  * 构造方法,自动执行
  */
 public function __construct()
 {
     // 调用模版处理类的自动初始化方法
     if (C('TEMPLATE_ENGINE_START')) {
         parent::__construct();
     }
     // 定义自定义构造方法 __init
     if (method_exists($this, '__init')) {
         $this->__init();
     }
     // 定义自定义构造方法 __auto
     if (method_exists($this, '__auto')) {
         $this->__auto();
     }
 }