Move DatabaseDomain to Rdbms namespace
[lhc/web/wiklou.git] / includes / libs / rdbms / lbfactory / LBFactory.php
index 15a5c0d..982b286 100644 (file)
  * @ingroup Database
  */
 
+namespace Wikimedia\Rdbms;
+
 use Psr\Log\LoggerInterface;
 use Wikimedia\ScopedCallback;
+use BagOStuff;
+use EmptyBagOStuff;
+use WANObjectCache;
+use Exception;
+use RuntimeException;
+use ILoadBalancer;
+use IDatabase;
+use LoadBalancer;
+use DBTransactionError;
+use DBReplicationWaitError;
 
 /**
  * An interface for generating database load balancers
@@ -100,7 +112,7 @@ abstract class LBFactory implements ILBFactory {
                                trigger_error( E_USER_WARNING, get_class( $e ) . ': ' . $e->getMessage() );
                        };
 
-               $this->profiler = isset( $params['profiler'] ) ? $params['profiler'] : null;
+               $this->profiler = isset( $conf['profiler'] ) ? $conf['profiler'] : null;
                $this->trxProfiler = isset( $conf['trxProfiler'] )
                        ? $conf['trxProfiler']
                        : new TransactionProfiler();
@@ -111,9 +123,9 @@ abstract class LBFactory implements ILBFactory {
                        'ChronologyProtection' => 'true'
                ];
 
-               $this->cliMode = isset( $params['cliMode'] ) ? $params['cliMode'] : PHP_SAPI === 'cli';
+               $this->cliMode = isset( $conf['cliMode'] ) ? $conf['cliMode'] : PHP_SAPI === 'cli';
                $this->hostname = isset( $conf['hostname'] ) ? $conf['hostname'] : gethostname();
-               $this->agent = isset( $params['agent'] ) ? $params['agent'] : '';
+               $this->agent = isset( $conf['agent'] ) ? $conf['agent'] : '';
 
                $this->ticket = mt_rand();
        }