MediaWiki  1.34.0
MediaWiki\Interwiki\NullInterwikiLookup Class Reference

An interwiki lookup that has no data, intended for use in the installer. More...

Inheritance diagram for MediaWiki\Interwiki\NullInterwikiLookup:
Collaboration diagram for MediaWiki\Interwiki\NullInterwikiLookup:

Public Member Functions

 fetch ( $prefix)
 Fetch an Interwiki object.
Parameters
string$prefixInterwiki prefix to use
Returns
Interwiki|null|bool
More...
 
 getAllPrefixes ( $local=null)
 Returns information about all interwiki prefixes, in the form of rows of the interwiki table.Each row may have the following keys:
  • iw_prefix: the prefix. Always present.
  • iw_url: the URL to use for linking, with $1 as a placeholder for the target page. Always present.
  • iw_api: the URL of the API. Optional.
  • iw_wikiid: the wiki ID (usually the database name for local wikis). Optional.
  • iw_local: whether the wiki is local, and the "magic redirect" mechanism should apply. Defaults to false.
  • iw_trans: whether "scary transclusion" is allowed for this site. Defaults to false.
Parameters
string | null$localIf set, limits output to local/non-local interwikis
Returns
array[] interwiki rows.
More...
 
 invalidateCache ( $prefix)
 Purge the in-process and persistent object cache for an interwiki prefix.
Parameters
string$prefix
More...
 
 isValidInterwiki ( $prefix)
 Check whether an interwiki prefix exists.
Parameters
string$prefixInterwiki prefix to use
Returns
bool Whether it exists
More...
 

Detailed Description

An interwiki lookup that has no data, intended for use in the installer.

Since
1.31

Definition at line 29 of file NullInterwikiLookup.php.

Member Function Documentation

◆ fetch()

MediaWiki\Interwiki\NullInterwikiLookup::fetch (   $prefix)

Fetch an Interwiki object.

Parameters
string$prefixInterwiki prefix to use
Returns
Interwiki|null|bool

Implements MediaWiki\Interwiki\InterwikiLookup.

Definition at line 41 of file NullInterwikiLookup.php.

◆ getAllPrefixes()

MediaWiki\Interwiki\NullInterwikiLookup::getAllPrefixes (   $local = null)

Returns information about all interwiki prefixes, in the form of rows of the interwiki table.Each row may have the following keys:

  • iw_prefix: the prefix. Always present.
  • iw_url: the URL to use for linking, with $1 as a placeholder for the target page. Always present.
  • iw_api: the URL of the API. Optional.
  • iw_wikiid: the wiki ID (usually the database name for local wikis). Optional.
  • iw_local: whether the wiki is local, and the "magic redirect" mechanism should apply. Defaults to false.
  • iw_trans: whether "scary transclusion" is allowed for this site. Defaults to false.
Parameters
string | null$localIf set, limits output to local/non-local interwikis
Returns
array[] interwiki rows.

Implements MediaWiki\Interwiki\InterwikiLookup.

Definition at line 48 of file NullInterwikiLookup.php.

◆ invalidateCache()

MediaWiki\Interwiki\NullInterwikiLookup::invalidateCache (   $prefix)

Purge the in-process and persistent object cache for an interwiki prefix.

Parameters
string$prefix

Implements MediaWiki\Interwiki\InterwikiLookup.

Definition at line 55 of file NullInterwikiLookup.php.

◆ isValidInterwiki()

MediaWiki\Interwiki\NullInterwikiLookup::isValidInterwiki (   $prefix)

Check whether an interwiki prefix exists.

Parameters
string$prefixInterwiki prefix to use
Returns
bool Whether it exists

Implements MediaWiki\Interwiki\InterwikiLookup.

Definition at line 34 of file NullInterwikiLookup.php.


The documentation for this class was generated from the following file: