|
MediaWiki master
|
Service interface for looking up Interwiki records. More...
Inherited by MediaWiki\Interwiki\ClassicInterwikiLookup, MediaWiki\Interwiki\InterwikiLookupAdapter, and MediaWiki\Interwiki\NullInterwikiLookup.
Public Member Functions | |
| fetch ( $prefix) | |
| Get the Interwiki object for a given prefix. | |
| getAllPrefixes ( $local=null) | |
| Returns information about all interwiki prefixes, in the form of rows of the interwiki table. | |
| invalidateCache ( $prefix) | |
| Purge the in-process and any persistent cache (e.g. | |
| isValidInterwiki ( $prefix) | |
| Check whether an interwiki prefix exists. | |
Service interface for looking up Interwiki records.
Default implementation is ClassicInterwikiLookup.
Definition at line 16 of file InterwikiLookup.php.
| MediaWiki\Interwiki\InterwikiLookup::fetch | ( | $prefix | ) |
Get the Interwiki object for a given prefix.
| string | $prefix | Interwiki prefix |
Implemented in MediaWiki\Interwiki\ClassicInterwikiLookup, MediaWiki\Interwiki\InterwikiLookupAdapter, and MediaWiki\Interwiki\NullInterwikiLookup.
| MediaWiki\Interwiki\InterwikiLookup::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:
The order of the rows matters! The first row matching a given URL is used by VisualEditor/Parsoid when converting external URLs to interwiki links. If, for example, both labsconsole: and wikitech: resolve to the same URL, but you want VisualEditor to prefer wikitech when adding new links, then the row for wikitech should come before the row for labsconsole.
| bool | null | $local | If set, limit output to local or non-local interwikis |
Implemented in MediaWiki\Interwiki\ClassicInterwikiLookup, MediaWiki\Interwiki\InterwikiLookupAdapter, and MediaWiki\Interwiki\NullInterwikiLookup.
| MediaWiki\Interwiki\InterwikiLookup::invalidateCache | ( | $prefix | ) |
Purge the in-process and any persistent cache (e.g.
memcached) for an interwiki prefix.
| string | $prefix |
Implemented in MediaWiki\Interwiki\ClassicInterwikiLookup, MediaWiki\Interwiki\InterwikiLookupAdapter, and MediaWiki\Interwiki\NullInterwikiLookup.
| MediaWiki\Interwiki\InterwikiLookup::isValidInterwiki | ( | $prefix | ) |
Check whether an interwiki prefix exists.
| string | $prefix | Interwiki prefix |
Implemented in MediaWiki\Interwiki\ClassicInterwikiLookup, MediaWiki\Interwiki\InterwikiLookupAdapter, and MediaWiki\Interwiki\NullInterwikiLookup.