/**
* @param array $conf An associative array with one member:
- * - connection: The DatabaseBase connection object
+ * - connection: The IDatabase connection object
*/
public function __construct( array $conf ) {
parent::__construct( $conf );
- $this->lb = new LoadBalancerSingle( [
- 'readOnlyReason' => $this->readOnlyReason,
- 'trxProfiler' => $this->trxProfiler,
- 'srvCache' => $this->srvCache,
- 'wanCache' => $this->wanCache
- ] + $conf );
+ $this->lb = new LoadBalancerSingle( array_merge( $this->baseLoadBalancerParams(), $conf ) );
}
/**
* @param bool|string $wiki Wiki ID, or false for the current wiki
* @return LoadBalancerSingle
*/
- public function &getExternalLB( $cluster, $wiki = false ) {
+ public function getExternalLB( $cluster, $wiki = false ) {
return $this->lb;
}
* Helper class for LBFactorySingle.
*/
class LoadBalancerSingle extends LoadBalancer {
- /** @var DatabaseBase */
+ /** @var IDatabase */
private $db;
/**
* @param string $server
* @param bool $dbNameOverride
*
- * @return DatabaseBase
+ * @return IDatabase
*/
protected function reallyOpenConnection( $server, $dbNameOverride = false ) {
return $this->db;