Go to the documentation of this file.
26 use InvalidArgumentException;
27 use BadMethodCallException;
41 parent::__construct( $conf );
43 if ( !isset( $conf[
'connection'] ) ) {
44 throw new InvalidArgumentException(
"Missing 'connection' argument." );
63 return new static( array_merge(
66 [
'connection' => $db ]
70 public function newMainLB( $domain =
false, $owner =
null ) {
71 throw new BadMethodCallException(
"Method is not supported." );
79 throw new BadMethodCallException(
"Method is not supported." );
83 throw new BadMethodCallException(
"Method is not supported." );
94 public function forEachLB( $callback, array $params = [] ) {
95 if ( isset( $this->lb ) ) {
96 $callback( $this->lb, ...$params );