/** * @param null $options * @throws \Exception */ public function __construct($options = null) { parent::__construct($options); if (isset($options['prefix'])) { $this->prefix = $options['prefix']; } }
/** * MedooDB constructor. * @param array $conf */ public function __construct($conf = []) { if (!$conf) { $conf = \Flight::get('config')->get('database'); } if (!isset($conf['charset'])) { $conf['charset'] = 'utf8'; } parent::__construct($conf); }
/** * 构造器,对生成异常进行捕获 * @param array $setting 数据库配置信息 */ function __construct($setting) { if (!is_array($setting)) { return; } try { parent::__construct($setting); $this->status = true; } catch (\Exception $ex) { $this->ex_message = $ex->getMessage(); } }
/** * Class constructor * * Initialize Database. * * @return void */ public function __construct($options = null) { parent::__construct($options); Hook::listen(__CLASS__); }
public function __construct() { $db = conf('database'); parent::__construct($db); }
/** * MedooPlus constructor. * @param array $options */ public function __construct($options) { parent::__construct($options); }
public function __construct() { parent::__construct(database()); }