+ protected function doInitConnection() {
+ if ( $this->dbPath !== null ) {
+ // Standalone .sqlite file mode.
+ $this->openFile( $this->dbPath, $this->connectionParams['dbname'] );
+ } elseif ( $this->dbDir !== null ) {
+ // Stock wiki mode using standard file names per DB
+ if ( strlen( $this->connectionParams['dbname'] ) ) {
+ $this->open(
+ $this->connectionParams['host'],
+ $this->connectionParams['user'],
+ $this->connectionParams['password'],
+ $this->connectionParams['dbname']
+ );
+ } else {
+ // Caller will manually call open() later?
+ $this->connLogger->debug( __METHOD__ . ': no database opened.' );
+ }
+ } else {
+ throw new InvalidArgumentException( "Need 'dbDirectory' or 'dbFilePath' parameter." );
+ }
+ }
+