/** * Printemps_Db constructor. * * @param $config database config * @return object */ function __construct($config) { $this->current = 0; $this->pool = array(); $this->connect($config, true); self::$_instance = $this; return $this->d; }
/** * instance construction * * @return void */ function __construct() { self::$_instance = $this; ini_set('date.timezone', 'Asia/Shanghai'); //ini_set('display_errors', 'no'); $this->__printemps['start'] = mktime(true); $_dbconfig = Printemps_Config::read('database'); if ($_dbconfig) { $this->db = Printemps_Db::getInstance(); } $this->view = Printemps_View::getInstance(); $this->request = Printemps_Request::getInstance(); }
/** * BaseModel construction */ function __construct() { $this->db = Printemps_Db::getInstance(); self::$_instance = $this; }