/** * Constructor. * * @param array $options Array of database options with keys: host, user, password, database, select. * * @since 3.4 */ public function __construct($options) { // Get some basic values from the options. $options['driver'] = 'mysql'; $options['charset'] = isset($options['charset']) ? $options['charset'] : 'utf8'; $this->charset = $options['charset']; // Finalize initialisation. parent::__construct($options); }
/** * Constructor. * * @param array $options List of options used to configure the connection * * @since 12.1 */ public function __construct($options) { $options['driver'] = 'oci'; $options['charset'] = isset($options['charset']) ? $options['charset'] : 'AL32UTF8'; $options['dateformat'] = isset($options['dateformat']) ? $options['dateformat'] : 'RRRR-MM-DD HH24:MI:SS'; $this->charset = $options['charset']; $this->dateformat = $options['dateformat']; // Finalize initialisation parent::__construct($options); }
/** * Constructor. * * @param array $options Array of database options with keys: host, user, password, database, select. * * @since 3.4 */ public function __construct($options) { // Get some basic values from the options. $options['driver'] = 'mysql'; if (!isset($options['charset']) || $options['charset'] == 'utf8') { $options['charset'] = 'utf8mb4'; } /** * Pre-populate the UTF-8 Multibyte compatibility flag. Unfortunately PDO won't report the server version * unless we're connected to it, and we cannot connect to it unless we know if it supports utf8mb4, which requires * us knowing the server version. Because of this chicken and egg issue, we _assume_ it's supported and we'll just * catch any problems at connection time. */ $this->utf8mb4 = $options['charset'] == 'utf8mb4'; // Finalize initialisation. parent::__construct($options); }
/** * Constructor. * * @param array $options List of options used to configure the connection * * @since 12.1 */ public function __construct($options) { // Finalize initialisation parent::__construct($options); }