5use InvalidArgumentException;
41 $this->params =
$conn;
43 throw new InvalidArgumentException(
"Missing lazy connection arguments." );
48 if ( $this->conn ===
null ) {
50 $this->conn = $this->lb->getConnection( $db, $groups, $wiki, $flags );
53 return $this->conn->$name( ...$arguments );
89 if ( $this->conn ===
null && $prefix ===
null ) {
92 return $domain->getTablePrefix();
93 }
elseif ( $this->conn !==
null && $prefix ===
null ) {
98 throw new DBUnexpectedError( $this,
"Database selection is disallowed to enable reuse." );
102 if ( $this->conn ===
null && $schema ===
null ) {
105 return $domain->getSchema();
106 }
elseif ( $this->conn !==
null && $schema ===
null ) {
111 throw new DBUnexpectedError( $this,
"Database selection is disallowed to enable reuse." );
120 throw new DBUnexpectedError( $this,
"Changing LB info is disallowed to enable reuse." );
125 throw new DBUnexpectedError( $this,
"Database injection is disallowed to enable reuse." );
176 public function setFlag( $flag, $remember = self::REMEMBER_NOTHING ) {
180 public function clearFlag( $flag, $remember = self::REMEMBER_NOTHING ) {
197 if ( $this->conn ===
null ) {
270 if ( $this->role !== ILoadBalancer::DB_MASTER ) {
271 $flags |= IDatabase::QUERY_REPLICA_ROLE;
274 return $this->
__call( __FUNCTION__, [ $sql,
$fname, $flags ] );
282 $table, $var, $cond =
'',
$fname = __METHOD__,
$options = [], $join_conds = []
288 $table, $var, $cond =
'',
$fname = __METHOD__,
$options = [], $join_conds = []
327 $table, $conds =
'',
$fname = __METHOD__,
$options = [], $join_conds = []
358 public function makeList( $a, $mode = self::LIST_COMMA ) {
374 public function bitAnd( $fieldLeft, $fieldRight ) {
378 public function bitOr( $fieldLeft, $fieldRight ) {
387 $delim, $table, $field, $conds =
'', $join_conds = []
417 throw new DBUnexpectedError( $this,
"Database selection is disallowed to enable reuse." );
422 throw new DBUnexpectedError( $this,
"Database selection is disallowed to enable reuse." );
426 if ( $this->conn ===
null ) {
429 return $domain->getDatabase();
480 $delTable, $joinTable, $delVar, $joinVar, $conds,
$fname = __METHOD__
494 $destTable, $srcTable, $varMap, $conds,
495 $fname = __METHOD__, $insertOptions = [], $selectOptions = [], $selectJoinConds = []
511 $table,
$vars,
array $permute_conds, $extra_conds =
'',
$fname = __METHOD__,
593 $fname = __METHOD__, $cancelable = IDatabase::ATOMIC_NOT_CANCELABLE
610 $fname, callable $callback, $cancelable = self::ATOMIC_NOT_CANCELABLE
616 public function begin(
$fname = __METHOD__, $mode = IDatabase::TRANSACTION_EXPLICIT ) {
640 public function ping( &$rtt =
null ) {
642 ? $this->
__call( __FUNCTION__, [ &$rtt ] )
643 : $this->
__call( __FUNCTION__, [] );
680 public function lock( $lockName, $method, $timeout = 5 ) {
686 public function unlock( $lockName, $method ) {
745 if ( $this->role !== ILoadBalancer::DB_MASTER ) {
755 $this->lb->reuseConnection( $this->conn );
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
if(defined( 'MW_SETUP_CALLBACK')) $fname
Customization point after all loading (constants, functions, classes, DefaultSettings,...
Class to handle database/prefix specification for IDatabase domains.
static newFromId( $domain)
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
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
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
$data
Utility to generate mapping file used in mw.Title (phpCharToUpper.json)
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))
if(is_array($mode)) switch( $mode) $input