__construct() public method

public __construct ( $options = null )
Esempio n. 1
0
 /**
  * @param null $options
  * @throws \Exception
  */
 public function __construct($options = null)
 {
     parent::__construct($options);
     if (isset($options['prefix'])) {
         $this->prefix = $options['prefix'];
     }
 }
Esempio n. 2
0
 /**
  * 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);
 }
Esempio n. 3
0
 /**
  * 构造器,对生成异常进行捕获
  * @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();
     }
 }
Esempio n. 4
0
 /**
  * Class constructor
  *
  * Initialize Database.
  *
  * @return void
  */
 public function __construct($options = null)
 {
     parent::__construct($options);
     Hook::listen(__CLASS__);
 }
Esempio n. 5
0
 public function __construct()
 {
     $db = conf('database');
     parent::__construct($db);
 }
Esempio n. 6
0
 /**
  * MedooPlus constructor.
  * @param array $options
  */
 public function __construct($options)
 {
     parent::__construct($options);
 }
Esempio n. 7
0
 public function __construct()
 {
     parent::__construct(database());
 }