/** * Constructor. * * $config is an array of key/value pairs containing configuration * options. Note that the SQLite options are different than most of * the other PDO adapters in that no username or password are needed. * Also, an extra config key "sqlite2" specifies compatibility mode. * * dbname => (string) The name of the database to user (required, * use :memory: for memory-based database) * * sqlite2 => (boolean) PDO_SQLITE defaults to SQLite 3. For compatibility * with an older SQLite 2 database, set this to TRUE. * * @param array $config An array of configuration keys. */ public function __construct(array $config = array()) { if (isset($config['sqlite2']) && $config['sqlite2']) { $this->_pdoType = 'sqlite2'; } // SQLite uses no username/password. Stub to satisfy parent::_connect() $this->_config['username'] = null; $this->_config['password'] = null; return parent::__construct($config); }