/**
  * Database object constructor
  *
  * @param   array  $options  List of options used to configure the connection
  *
  * @since	1.0
  */
 public function __construct($options)
 {
     $options['host'] = isset($options['host']) ? $options['host'] : 'localhost';
     $options['user'] = isset($options['user']) ? $options['user'] : '';
     $options['password'] = isset($options['password']) ? $options['password'] : '';
     $options['database'] = isset($options['database']) ? $options['database'] : '';
     $options['port'] = isset($options['port']) ? $options['port'] : null;
     // Finalize initialization
     parent::__construct($options);
 }
Пример #2
0
 /**
  * Constructor.
  *
  * @param   array  $options  List of options used to configure the connection
  *
  * @since   1.0
  */
 public function __construct($options)
 {
     // Get some basic values from the options.
     $options['host'] = isset($options['host']) ? $options['host'] : 'localhost';
     $options['user'] = isset($options['user']) ? $options['user'] : '';
     $options['password'] = isset($options['password']) ? $options['password'] : '';
     $options['database'] = isset($options['database']) ? $options['database'] : '';
     $options['select'] = isset($options['select']) ? (bool) $options['select'] : true;
     // Finalize initialisation
     parent::__construct($options);
 }
Пример #3
0
 /**
  * Constructor.
  *
  * @param   array  $options  List of options used to configure the connection
  *
  * @since   1.0
  */
 public function __construct($options)
 {
     // Get some basic values from the options.
     $options['driver'] = isset($options['driver']) ? $options['driver'] : 'odbc';
     $options['dsn'] = isset($options['dsn']) ? $options['dsn'] : '';
     $options['host'] = isset($options['host']) ? $options['host'] : 'localhost';
     $options['database'] = isset($options['database']) ? $options['database'] : '';
     $options['user'] = isset($options['user']) ? $options['user'] : '';
     $options['password'] = isset($options['password']) ? $options['password'] : '';
     $options['driverOptions'] = isset($options['driverOptions']) ? $options['driverOptions'] : array();
     // Finalize initialisation
     parent::__construct($options);
 }
Пример #4
0
 /**
  * Constructor.
  *
  * @param   array  $options  List of options used to configure the connection
  *
  * @since   1.0
  */
 public function __construct($options)
 {
     // Get some basic values from the options.
     $options['host'] = isset($options['host']) ? $options['host'] : 'localhost';
     $options['user'] = isset($options['user']) ? $options['user'] : '******';
     $options['password'] = isset($options['password']) ? $options['password'] : '';
     $options['database'] = isset($options['database']) ? $options['database'] : '';
     $options['select'] = isset($options['select']) ? (bool) $options['select'] : true;
     $options['port'] = isset($options['port']) ? (int) $options['port'] : null;
     $options['socket'] = isset($options['socket']) ? $options['socket'] : null;
     $options['utf8mb4'] = isset($options['utf8mb4']) ? (bool) $options['utf8mb4'] : false;
     // Finalize initialisation.
     parent::__construct($options);
 }