MediaWiki master
MediaWiki\Interwiki\NullInterwikiLookup Class Reference

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

Inherits MediaWiki\Interwiki\InterwikiLookup.

Collaboration diagram for MediaWiki\Interwiki\NullInterwikiLookup:

Public Member Functions

 fetch ( $prefix)
 Get the Interwiki object for a given prefix.
Parameters
string$prefixInterwiki prefix
Returns
Interwiki|null|false Null for invalid, false for not found

 
 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
bool | null$localIf set, limit output to local or non-local interwikis
Returns
array[] interwiki rows.

 
 invalidateCache ( $prefix)
 Purge the in-process and any persistent cache (e.g.memcached) for an interwiki prefix.
Parameters
string$prefix

 
 isValidInterwiki ( $prefix)
 Check whether an interwiki prefix exists.
Parameters
string$prefixInterwiki prefix
Returns
bool Whether it exists

 

Detailed Description

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

Since
1.31

Definition at line 30 of file NullInterwikiLookup.php.

Member Function Documentation

◆ fetch()

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

Get the Interwiki object for a given prefix.

Parameters
string$prefixInterwiki prefix
Returns
Interwiki|null|false Null for invalid, false for not found

Implements MediaWiki\Interwiki\InterwikiLookup.

Definition at line 42 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
bool | null$localIf set, limit output to local or non-local interwikis
Returns
array[] interwiki rows.

Implements MediaWiki\Interwiki\InterwikiLookup.

Definition at line 49 of file NullInterwikiLookup.php.

◆ invalidateCache()

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

Purge the in-process and any persistent cache (e.g.memcached) for an interwiki prefix.

Parameters
string$prefix

Implements MediaWiki\Interwiki\InterwikiLookup.

Definition at line 56 of file NullInterwikiLookup.php.

◆ isValidInterwiki()

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

Check whether an interwiki prefix exists.

Parameters
string$prefixInterwiki prefix
Returns
bool Whether it exists

Implements MediaWiki\Interwiki\InterwikiLookup.

Definition at line 35 of file NullInterwikiLookup.php.


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