技术笔记
tp5.1继承基类构建器及集成父类
 moons   2020-07-30 10:53:34   111
专栏分类: PHP
    基类初始化
    public function initialize()
    {
    	defined('TID') or define('TID', '3');
    	$this->checkToken();
    }
    
    protected $tid;
    // 集成父类
    public function initialize()
    {
    	parent::initialize();
    	$this->tid = TID;
    }
    // 构建器
    public function __construct()
    {
    	parent::__construct();
    	$this->tid = TID;
    }
Copyright © mos360.cn By Moons Soft Studio 百度统计