Merge "Disable warning about direct text table access for now"
[lhc/web/wiklou.git] / includes / libs / rdbms / database / Database.php
index e35e082..e276d09 100644 (file)
@@ -266,7 +266,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
        /** @var int[] Prior flags member variable values */
        private $priorFlags = [];
 
-       /** @var object|string Class name or object With profileIn/profileOut methods */
+       /** @var mixed Class name or object With profileIn/profileOut methods */
        protected $profiler;
        /** @var TransactionProfiler */
        protected $trxProfiler;
@@ -373,6 +373,18 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
                }
        }
 
+       /**
+        * Open a new connection to the database (closing any existing one)
+        *
+        * @param string $server Database server host
+        * @param string $user Database user name
+        * @param string $password Database user password
+        * @param string $dbName Database name
+        * @return bool
+        * @throws DBConnectionError
+        */
+       abstract protected function open( $server, $user, $password, $dbName );
+
        /**
         * Construct a Database subclass instance given a database type and parameters
         *
@@ -3496,7 +3508,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
                                        list( $phpCallback ) = $callback;
                                        $phpCallback( $this );
                                } catch ( Exception $ex ) {
-                                       $this->errorLogger( $ex );
+                                       ( $this->errorLogger )( $ex );
                                        $e = $e ?: $ex;
                                }
                        }
@@ -4018,7 +4030,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
         * a wrapper. Nowadays, raw database objects are never exposed to external
         * callers, so this is unnecessary in external code.
         *
-        * @param bool|ResultWrapper|resource|object $result
+        * @param bool|ResultWrapper|resource $result
         * @return bool|ResultWrapper
         */
        protected function resultObject( $result ) {