Checks if a namespace in Wikibase Client shall have wikibase links, etc., based on settings.
More...
|
| isExcluded ( $namespace) |
| Check if the namespace is excluded by settings for having wikibase links, etc. More...
|
|
| isEnabled ( $namespace) |
| Check if namespace is enabled for Wikibase, based on the 'namespaces' setting. More...
|
|
Checks if a namespace in Wikibase Client shall have wikibase links, etc., based on settings.
- Copyright
- GPL-2.0-or-later
- Author
- Katie Filbert < aude..nosp@m.wiki.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >
-
Daniel Kinzler
◆ __construct()
Wikibase\Client\NamespaceChecker::__construct |
( |
array |
$excludedNamespaces, |
|
|
array |
$enabledNamespaces = [] , |
|
|
NamespaceInfo |
$namespaceInfo = null |
|
) |
| |
- Parameters
-
int[] | $excludedNamespaces | |
int[] | $enabledNamespaces | if empty, setting not in use and all namespaces enabled |
NamespaceInfo | null | $namespaceInfo | falls back to default instance |
◆ getEnabledNamespaces()
Wikibase\Client\NamespaceChecker::getEnabledNamespaces |
( |
| ) |
|
◆ getExcludedNamespaces()
Wikibase\Client\NamespaceChecker::getExcludedNamespaces |
( |
| ) |
|
◆ getWikibaseNamespaces()
Wikibase\Client\NamespaceChecker::getWikibaseNamespaces |
( |
| ) |
|
Get the namespaces Wikibase is effectively enabled in.
- Returns
- int[]
◆ isEnabled()
Wikibase\Client\NamespaceChecker::isEnabled |
( |
|
$namespace | ) |
|
|
private |
Check if namespace is enabled for Wikibase, based on the 'namespaces' setting.
Note: If no list of enabled namespaces is configured, all namespaces are considered to be enabled for Wikibase.
- Parameters
-
- Returns
- bool
◆ isExcluded()
Wikibase\Client\NamespaceChecker::isExcluded |
( |
|
$namespace | ) |
|
|
private |
Check if the namespace is excluded by settings for having wikibase links, etc.
based on the 'excludeNamespaces' setting.
- Parameters
-
- Returns
- bool
◆ isWikibaseEnabled()
Wikibase\Client\NamespaceChecker::isWikibaseEnabled |
( |
|
$namespace | ) |
|
Per the settings, does the namespace have wikibase enabled? note: excludeNamespaces, if set, overrides namespace (inclusion) settings.
- Parameters
-
- Exceptions
-
- Returns
- bool
◆ $enabledNamespaces
Wikibase\Client\NamespaceChecker::$enabledNamespaces |
|
private |
◆ $excludedNamespaces
Wikibase\Client\NamespaceChecker::$excludedNamespaces |
|
private |
◆ $namespaceInfo
Wikibase\Client\NamespaceChecker::$namespaceInfo |
|
private |
The documentation for this class was generated from the following file: