Go to the documentation of this file.
5 use InvalidArgumentException;
37 $this->params =
$conn;
39 throw new InvalidArgumentException(
"Missing lazy connection arguments." );
44 if ( $this->conn ===
null ) {
46 $this->conn = $this->lb->getConnection( $db, $groups, $wiki, $flags );
49 return $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() );
137 return $this->
__call( __FUNCTION__, func_get_args() );
141 return $this->
__call( __FUNCTION__, func_get_args() );
144 public function setFlag( $flag, $remember = self::REMEMBER_NOTHING ) {
145 return $this->
__call( __FUNCTION__, func_get_args() );
148 public function clearFlag( $flag, $remember = self::REMEMBER_NOTHING ) {
149 return $this->
__call( __FUNCTION__, func_get_args() );
153 return $this->
__call( __FUNCTION__, func_get_args() );
157 return $this->
__call( __FUNCTION__, func_get_args() );
161 return $this->
__call( __FUNCTION__, func_get_args() );
165 if ( $this->conn ===
null ) {
171 return $this->
__call( __FUNCTION__, func_get_args() );
182 return $this->
__call( __FUNCTION__, func_get_args() );
186 return $this->
__call( __FUNCTION__, func_get_args() );
190 return $this->
__call( __FUNCTION__, func_get_args() );
194 return $this->
__call( __FUNCTION__, func_get_args() );
198 return $this->
__call( __FUNCTION__, func_get_args() );
202 return $this->
__call( __FUNCTION__, func_get_args() );
206 return $this->
__call( __FUNCTION__, func_get_args() );
210 return $this->
__call( __FUNCTION__, func_get_args() );
214 return $this->
__call( __FUNCTION__, func_get_args() );
218 return $this->
__call( __FUNCTION__, func_get_args() );
222 return $this->
__call( __FUNCTION__, func_get_args() );
226 return $this->
__call( __FUNCTION__, func_get_args() );
230 return $this->
__call( __FUNCTION__, func_get_args() );
234 return $this->
__call( __FUNCTION__, func_get_args() );
237 public function query( $sql,
$fname = __METHOD__, $tempIgnore =
false ) {
238 return $this->
__call( __FUNCTION__, func_get_args() );
242 return $this->
__call( __FUNCTION__, func_get_args() );
246 $table, $var, $cond =
'',
$fname = __METHOD__,
$options = [], $join_conds = []
248 return $this->
__call( __FUNCTION__, func_get_args() );
252 $table, $var, $cond =
'',
$fname = __METHOD__,
$options = [], $join_conds = []
254 return $this->
__call( __FUNCTION__, func_get_args() );
261 return $this->
__call( __FUNCTION__, func_get_args() );
268 return $this->
__call( __FUNCTION__, func_get_args() );
275 return $this->
__call( __FUNCTION__, func_get_args() );
281 return $this->
__call( __FUNCTION__, func_get_args() );
287 return $this->
__call( __FUNCTION__, func_get_args() );
291 $table, $conds =
'',
$fname = __METHOD__,
$options = [], $join_conds = []
293 return $this->
__call( __FUNCTION__, func_get_args() );
297 return $this->
__call( __FUNCTION__, func_get_args() );
301 return $this->
__call( __FUNCTION__, func_get_args() );
305 return $this->
__call( __FUNCTION__, func_get_args() );
309 return $this->
__call( __FUNCTION__, func_get_args() );
313 return $this->
__call( __FUNCTION__, func_get_args() );
317 return $this->
__call( __FUNCTION__, func_get_args() );
321 return $this->
__call( __FUNCTION__, func_get_args() );
325 return $this->
__call( __FUNCTION__, func_get_args() );
329 return $this->
__call( __FUNCTION__, func_get_args() );
332 public function bitAnd( $fieldLeft, $fieldRight ) {
333 return $this->
__call( __FUNCTION__, func_get_args() );
336 public function bitOr( $fieldLeft, $fieldRight ) {
337 return $this->
__call( __FUNCTION__, func_get_args() );
341 return $this->
__call( __FUNCTION__, func_get_args() );
345 $delim, $table, $field, $conds =
'', $join_conds = []
347 return $this->
__call( __FUNCTION__, func_get_args() );
351 return $this->
__call( __FUNCTION__, func_get_args() );
355 return $this->
__call( __FUNCTION__, func_get_args() );
359 return $this->
__call( __FUNCTION__, func_get_args() );
366 return $this->
__call( __FUNCTION__, func_get_args() );
370 return $this->
__call( __FUNCTION__, func_get_args() );
375 throw new DBUnexpectedError( $this,
"Database selection is disallowed to enable reuse." );
380 throw new DBUnexpectedError( $this,
"Database selection is disallowed to enable reuse." );
384 return $this->
__call( __FUNCTION__, func_get_args() );
388 return $this->
__call( __FUNCTION__, func_get_args() );
392 return $this->
__call( __FUNCTION__, func_get_args() );
396 return $this->
__call( __FUNCTION__, func_get_args() );
400 return $this->
__call( __FUNCTION__, func_get_args() );
404 return $this->
__call( __FUNCTION__, func_get_args() );
408 return $this->
__call( __FUNCTION__, func_get_args() );
412 return $this->
__call( __FUNCTION__, func_get_args() );
418 return $this->
__call( __FUNCTION__, func_get_args() );
422 $delTable, $joinTable, $delVar, $joinVar, $conds,
$fname = __METHOD__
424 return $this->
__call( __FUNCTION__, func_get_args() );
427 public function delete( $table, $conds,
$fname = __METHOD__ ) {
428 return $this->
__call( __FUNCTION__, func_get_args() );
432 $destTable, $srcTable, $varMap, $conds,
433 $fname = __METHOD__, $insertOptions = [], $selectOptions = [], $selectJoinConds = []
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 $table,
$vars,
array $permute_conds, $extra_conds =
'',
$fname = __METHOD__,
450 return $this->
__call( __FUNCTION__, func_get_args() );
454 return $this->
__call( __FUNCTION__, func_get_args() );
458 return $this->
__call( __FUNCTION__, func_get_args() );
462 return $this->
__call( __FUNCTION__, func_get_args() );
466 return $this->
__call( __FUNCTION__, func_get_args() );
470 return $this->
__call( __FUNCTION__, func_get_args() );
474 return $this->
__call( __FUNCTION__, func_get_args() );
478 return $this->
__call( __FUNCTION__, func_get_args() );
482 return $this->
__call( __FUNCTION__, func_get_args() );
486 return $this->
__call( __FUNCTION__, func_get_args() );
490 return $this->
__call( __FUNCTION__, func_get_args() );
494 return $this->
__call( __FUNCTION__, func_get_args() );
498 return $this->
__call( __FUNCTION__, func_get_args() );
502 return $this->
__call( __FUNCTION__, func_get_args() );
506 return $this->
__call( __FUNCTION__, func_get_args() );
510 return $this->
__call( __FUNCTION__, func_get_args() );
514 return $this->
__call( __FUNCTION__, func_get_args() );
518 return $this->
__call( __FUNCTION__, func_get_args() );
522 $fname = __METHOD__, $cancelable = IDatabase::ATOMIC_NOT_CANCELABLE
524 return $this->
__call( __FUNCTION__, func_get_args() );
528 return $this->
__call( __FUNCTION__, func_get_args() );
532 return $this->
__call( __FUNCTION__, func_get_args() );
536 $fname, callable $callback, $cancelable = self::ATOMIC_NOT_CANCELABLE
538 return $this->
__call( __FUNCTION__, func_get_args() );
541 public function begin(
$fname = __METHOD__, $mode = IDatabase::TRANSACTION_EXPLICIT ) {
542 return $this->
__call( __FUNCTION__, func_get_args() );
546 return $this->
__call( __FUNCTION__, func_get_args() );
550 return $this->
__call( __FUNCTION__, func_get_args() );
554 return $this->
__call( __FUNCTION__, func_get_args() );
558 return $this->
__call( __FUNCTION__, func_get_args() );
562 return $this->
__call( __FUNCTION__, func_get_args() );
565 public function ping( &$rtt =
null ) {
566 return func_num_args()
567 ? $this->
__call( __FUNCTION__, [ &$rtt ] )
568 : $this->
__call( __FUNCTION__, [] );
572 return $this->
__call( __FUNCTION__, func_get_args() );
576 return $this->
__call( __FUNCTION__, func_get_args() );
580 return $this->
__call( __FUNCTION__, func_get_args() );
584 return $this->
__call( __FUNCTION__, func_get_args() );
588 return $this->
__call( __FUNCTION__, func_get_args() );
592 return $this->
__call( __FUNCTION__, func_get_args() );
596 return $this->
__call( __FUNCTION__, func_get_args() );
600 return $this->
__call( __FUNCTION__, func_get_args() );
603 public function lock( $lockName, $method, $timeout = 5 ) {
604 return $this->
__call( __FUNCTION__, func_get_args() );
607 public function unlock( $lockName, $method ) {
608 return $this->
__call( __FUNCTION__, func_get_args() );
612 return $this->
__call( __FUNCTION__, func_get_args() );
616 return $this->
__call( __FUNCTION__, func_get_args() );
620 return $this->
__call( __FUNCTION__, func_get_args() );
624 return $this->
__call( __FUNCTION__, func_get_args() );
628 return $this->
__call( __FUNCTION__, func_get_args() );
632 return $this->
__call( __FUNCTION__, func_get_args() );
636 return $this->
__call( __FUNCTION__, func_get_args() );
640 return $this->
__call( __FUNCTION__, func_get_args() );
644 return $this->
__call( __FUNCTION__, func_get_args() );
652 $this->lb->reuseConnection( $this->conn );
this hook is for auditing only 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
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
if(is_array( $mode)) switch( $mode) $input
as see the revision history and available at free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
static configuration should be added through ResourceLoaderGetConfigVars instead & $vars
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))
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
if(defined( 'MW_SETUP_CALLBACK')) $fname
Customization point after all loading (constants, functions, classes, DefaultSettings,...
Allows to change the fields on the form that will be generated $name
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
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
you have access to all of the normal MediaWiki so you can get a DB use the etc For full docs on the Maintenance class
Class to handle database/prefix specification for IDatabase domains.