/** @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;
}
}
+ /**
+ * 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
*
list( $phpCallback ) = $callback;
$phpCallback( $this );
} catch ( Exception $ex ) {
- $this->errorLogger( $ex );
+ ( $this->errorLogger )( $ex );
$e = $e ?: $ex;
}
}
* 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 ) {