22use InvalidArgumentException;
41 $conn =
$params[
'connection'] ??
null;
43 throw new InvalidArgumentException(
"Missing 'connection' argument." );
48 parent::__construct( [
55 'trxProfiler' =>
$params[
'trxProfiler'] ??
null,
56 'srvCache' =>
$params[
'srvCache'] ??
null,
57 'wanCache' =>
$params[
'wanCache'] ??
null,
58 'localDomain' =>
$params[
'localDomain'] ?? $this->conn->getDomainID(),
59 'readOnlyReason' =>
$params[
'readOnlyReason'] ??
false,
60 'clusterName' =>
$params[
'clusterName'] ??
null,
63 if ( isset(
$params[
'readOnlyReason'] ) ) {
75 return new static( array_merge(
78 [
'connection' => $db ]
92 foreach ( $lbInfo as $k => $v ) {
93 $this->conn->setLBInfo( $k, $v );
array $params
The job parameters.
Class to handle database/schema/prefix specifications for IDatabase.