5use InvalidArgumentException;
36 } elseif ( is_array(
$conn ) && count(
$conn ) >= 4 &&
$conn[self::FLD_DOMAIN] !==
false ) {
37 $this->params =
$conn;
39 throw new InvalidArgumentException(
"Missing lazy connection arguments." );
43 function __call( $name, array $arguments ) {
44 if ( $this->conn ===
null ) {
46 $this->conn = $this->lb->getConnection( $db, $groups, $wiki, $flags );
49 return call_user_func_array( [ $this->conn, $name ], $arguments );
53 return $this->
__call( __FUNCTION__, func_get_args() );
57 return $this->
__call( __FUNCTION__, func_get_args() );
61 return $this->
__call( __FUNCTION__, func_get_args() );
65 return $this->
__call( __FUNCTION__, func_get_args() );
69 return $this->
__call( __FUNCTION__, func_get_args() );
73 return $this->
__call( __FUNCTION__, func_get_args() );
77 return $this->
__call( __FUNCTION__, func_get_args() );
81 return $this->
__call( __FUNCTION__, func_get_args() );
85 return $this->
__call( __FUNCTION__, func_get_args() );
89 return $this->
__call( __FUNCTION__, func_get_args() );
93 return $this->
__call( __FUNCTION__, func_get_args() );
97 return $this->
__call( __FUNCTION__, func_get_args() );
101 return $this->
__call( __FUNCTION__, func_get_args() );
105 return $this->
__call( __FUNCTION__, func_get_args() );
109 return $this->
__call( __FUNCTION__, func_get_args() );
113 return $this->
__call( __FUNCTION__, func_get_args() );
117 return $this->
__call( __FUNCTION__, func_get_args() );
121 return $this->
__call( __FUNCTION__, func_get_args() );
125 return $this->
__call( __FUNCTION__, func_get_args() );
129 return $this->
__call( __FUNCTION__, func_get_args() );
133 return $this->
__call( __FUNCTION__, func_get_args() );
136 public function setFlag( $flag, $remember = self::REMEMBER_NOTHING ) {
137 return $this->
__call( __FUNCTION__, func_get_args() );
140 public function clearFlag( $flag, $remember = self::REMEMBER_NOTHING ) {
141 return $this->
__call( __FUNCTION__, func_get_args() );
145 return $this->
__call( __FUNCTION__, func_get_args() );
149 return $this->
__call( __FUNCTION__, func_get_args() );
153 return $this->
__call( __FUNCTION__, func_get_args() );
157 if ( $this->conn ===
null ) {
163 return $this->
__call( __FUNCTION__, func_get_args() );
171 return $this->
__call( __FUNCTION__, func_get_args() );
174 public function open( $server, $user, $password, $dbName ) {
175 return $this->
__call( __FUNCTION__, func_get_args() );
179 return $this->
__call( __FUNCTION__, func_get_args() );
183 return $this->
__call( __FUNCTION__, func_get_args() );
187 return $this->
__call( __FUNCTION__, func_get_args() );
191 return $this->
__call( __FUNCTION__, func_get_args() );
195 return $this->
__call( __FUNCTION__, func_get_args() );
199 return $this->
__call( __FUNCTION__, func_get_args() );
203 return $this->
__call( __FUNCTION__, func_get_args() );
207 return $this->
__call( __FUNCTION__, func_get_args() );
211 return $this->
__call( __FUNCTION__, func_get_args() );
215 return $this->
__call( __FUNCTION__, func_get_args() );
219 return $this->
__call( __FUNCTION__, func_get_args() );
223 return $this->
__call( __FUNCTION__, func_get_args() );
227 return $this->
__call( __FUNCTION__, func_get_args() );
230 public function query( $sql,
$fname = __METHOD__, $tempIgnore =
false ) {
231 return $this->
__call( __FUNCTION__, func_get_args() );
235 return $this->
__call( __FUNCTION__, func_get_args() );
239 $table, $var, $cond =
'',
$fname = __METHOD__,
$options = [], $join_conds = []
241 return $this->
__call( __FUNCTION__, func_get_args() );
245 $table, $var, $cond =
'',
$fname = __METHOD__,
$options = [], $join_conds = []
247 return $this->
__call( __FUNCTION__, func_get_args() );
254 return $this->
__call( __FUNCTION__, func_get_args() );
261 return $this->
__call( __FUNCTION__, func_get_args() );
268 return $this->
__call( __FUNCTION__, func_get_args() );
274 return $this->
__call( __FUNCTION__, func_get_args() );
280 return $this->
__call( __FUNCTION__, func_get_args() );
284 return $this->
__call( __FUNCTION__, func_get_args() );
288 return $this->
__call( __FUNCTION__, func_get_args() );
292 return $this->
__call( __FUNCTION__, func_get_args() );
296 return $this->
__call( __FUNCTION__, func_get_args() );
300 return $this->
__call( __FUNCTION__, func_get_args() );
303 public function makeList( $a, $mode = self::LIST_COMMA ) {
304 return $this->
__call( __FUNCTION__, func_get_args() );
308 return $this->
__call( __FUNCTION__, func_get_args() );
312 return $this->
__call( __FUNCTION__, func_get_args() );
316 return $this->
__call( __FUNCTION__, func_get_args() );
319 public function bitAnd( $fieldLeft, $fieldRight ) {
320 return $this->
__call( __FUNCTION__, func_get_args() );
323 public function bitOr( $fieldLeft, $fieldRight ) {
324 return $this->
__call( __FUNCTION__, func_get_args() );
328 return $this->
__call( __FUNCTION__, func_get_args() );
332 $delim, $table, $field, $conds =
'', $join_conds = []
334 return $this->
__call( __FUNCTION__, func_get_args() );
338 return $this->
__call( __FUNCTION__, func_get_args() );
342 return $this->
__call( __FUNCTION__, func_get_args() );
346 return $this->
__call( __FUNCTION__, func_get_args() );
353 return $this->
__call( __FUNCTION__, func_get_args() );
357 return $this->
__call( __FUNCTION__, func_get_args() );
361 return $this->
__call( __FUNCTION__, func_get_args() );
365 return $this->
__call( __FUNCTION__, func_get_args() );
369 return $this->
__call( __FUNCTION__, func_get_args() );
373 return $this->
__call( __FUNCTION__, func_get_args() );
377 return $this->
__call( __FUNCTION__, func_get_args() );
381 return $this->
__call( __FUNCTION__, func_get_args() );
385 return $this->
__call( __FUNCTION__, func_get_args() );
389 return $this->
__call( __FUNCTION__, func_get_args() );
393 return $this->
__call( __FUNCTION__, func_get_args() );
397 $table, array
$rows, array $uniqueIndexes, array $set,
$fname = __METHOD__
399 return $this->
__call( __FUNCTION__, func_get_args() );
403 $delTable, $joinTable, $delVar, $joinVar, $conds,
$fname = __METHOD__
405 return $this->
__call( __FUNCTION__, func_get_args() );
408 public function delete( $table, $conds,
$fname = __METHOD__ ) {
409 return $this->
__call( __FUNCTION__, func_get_args() );
413 $destTable, $srcTable, $varMap, $conds,
414 $fname = __METHOD__, $insertOptions = [], $selectOptions = [], $selectJoinConds = []
416 return $this->
__call( __FUNCTION__, func_get_args() );
420 return $this->
__call( __FUNCTION__, func_get_args() );
424 return $this->
__call( __FUNCTION__, func_get_args() );
428 $table,
$vars, array $permute_conds, $extra_conds =
'',
$fname = __METHOD__,
431 return $this->
__call( __FUNCTION__, func_get_args() );
435 return $this->
__call( __FUNCTION__, func_get_args() );
439 return $this->
__call( __FUNCTION__, func_get_args() );
443 return $this->
__call( __FUNCTION__, func_get_args() );
447 return $this->
__call( __FUNCTION__, func_get_args() );
451 return $this->
__call( __FUNCTION__, func_get_args() );
455 return $this->
__call( __FUNCTION__, func_get_args() );
459 return $this->
__call( __FUNCTION__, func_get_args() );
463 return $this->
__call( __FUNCTION__, func_get_args() );
467 return $this->
__call( __FUNCTION__, func_get_args() );
471 return $this->
__call( __FUNCTION__, func_get_args() );
475 return $this->
__call( __FUNCTION__, func_get_args() );
479 return $this->
__call( __FUNCTION__, func_get_args() );
483 return $this->
__call( __FUNCTION__, func_get_args() );
487 return $this->
__call( __FUNCTION__, func_get_args() );
491 return $this->
__call( __FUNCTION__, func_get_args() );
495 return $this->
__call( __FUNCTION__, func_get_args() );
499 $fname = __METHOD__, $cancelable = IDatabase::ATOMIC_NOT_CANCELABLE
501 return $this->
__call( __FUNCTION__, func_get_args() );
505 return $this->
__call( __FUNCTION__, func_get_args() );
509 return $this->
__call( __FUNCTION__, func_get_args() );
513 $fname, callable $callback, $cancelable = self::ATOMIC_NOT_CANCELABLE
515 return $this->
__call( __FUNCTION__, func_get_args() );
518 public function begin(
$fname = __METHOD__, $mode = IDatabase::TRANSACTION_EXPLICIT ) {
519 return $this->
__call( __FUNCTION__, func_get_args() );
523 return $this->
__call( __FUNCTION__, func_get_args() );
527 return $this->
__call( __FUNCTION__, func_get_args() );
531 return $this->
__call( __FUNCTION__, func_get_args() );
535 return $this->
__call( __FUNCTION__, func_get_args() );
539 return $this->
__call( __FUNCTION__, func_get_args() );
542 public function ping( &$rtt =
null ) {
543 return func_num_args()
544 ? $this->
__call( __FUNCTION__, [ &$rtt ] )
545 : $this->
__call( __FUNCTION__, [] );
549 return $this->
__call( __FUNCTION__, func_get_args() );
553 return $this->
__call( __FUNCTION__, func_get_args() );
557 return $this->
__call( __FUNCTION__, func_get_args() );
561 return $this->
__call( __FUNCTION__, func_get_args() );
565 return $this->
__call( __FUNCTION__, func_get_args() );
569 return $this->
__call( __FUNCTION__, func_get_args() );
573 return $this->
__call( __FUNCTION__, func_get_args() );
577 return $this->
__call( __FUNCTION__, func_get_args() );
580 public function lock( $lockName, $method, $timeout = 5 ) {
581 return $this->
__call( __FUNCTION__, func_get_args() );
584 public function unlock( $lockName, $method ) {
585 return $this->
__call( __FUNCTION__, func_get_args() );
589 return $this->
__call( __FUNCTION__, func_get_args() );
593 return $this->
__call( __FUNCTION__, func_get_args() );
597 return $this->
__call( __FUNCTION__, func_get_args() );
601 return $this->
__call( __FUNCTION__, func_get_args() );
605 return $this->
__call( __FUNCTION__, func_get_args() );
609 return $this->
__call( __FUNCTION__, func_get_args() );
613 return $this->
__call( __FUNCTION__, func_get_args() );
617 return $this->
__call( __FUNCTION__, func_get_args() );
621 return $this->
__call( __FUNCTION__, func_get_args() );
629 $this->lb->reuseConnection( $this->conn );
634class_alias( DBConnRef::class,
'DBConnRef' );
if(defined( 'MW_SETUP_CALLBACK')) $fname
Customization point after all loading (constants, functions, classes, DefaultSettings,...
Class to handle database/prefix specification for IDatabase domains.
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
static configuration should be added through ResourceLoaderGetConfigVars instead & $vars
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction $rows
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure use sub classes of those in conjunction with the ChangesListSpecialPageStructuredFilters hook This hook can be used to implement filters that do not implement that or custom behavior that is not an individual filter e g Watchlist & $tables
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options
if(is_array($mode)) switch( $mode) $input