Holds LinkTitles configuration. More...
Public Member Functions | |
sqliteDatabase () | |
Determines whether the MediaWiki database is SQLITE by inspecting the $wgDBtype variable (which is cached in $this->dbType). More... | |
__construct () | |
Constructs a new Config object. More... | |
Public Attributes | |
$parseOnEdit | |
Whether to add links to a page when the page is edited/saved. | |
$parseOnRender | |
Whether to add links to a page when the page is rendered. | |
$preferShortTitles | |
Indicates whether to prioritize short over long titles. | |
$minimumTitleLength | |
Minimum length of a page title for it to qualify as a potential link target. | |
$blackList | |
Array of page titles that must never be link targets. More... | |
$sourceNamespaces | |
Array of those namespaces (integer constants) whose pages may be linked when edited. | |
$targetNamespaces | |
Array of those namespaces (integer constants) whose pages may be linked to a source page. | |
$firstOnly | |
Indicates whether to add a link to the first occurrence of a page title only (true), or add links to all occurrences on the source page (false). | |
$smartMode | |
Indicates whether to operate in smart mode, i.e. More... | |
$capitalLinks | |
Mirrors the global MediaWiki variable $wgCapitalLinks that indicates whether or not page titles are fully case sensitive. | |
$wordStartOnly | |
Whether or not to link to pages only if the page title appears at the start of a word on the target page (i.e., link 'MediaWiki' to a page 'Media', but not to a page 'Wiki'). More... | |
$wordEndOnly | |
Whether or not to link to pages only if the page title appears at the end of a word on the target page (i.e., link 'MediaWiki' to a page 'Wiki', but not to a page 'Media'). More... | |
$skipTemplates | |
Whether or not to skip templates. More... | |
$parseHeadings | |
Whether or not to parse headings. | |
$checkRedirect | |
Whether to check if a potential target page links back to the source page. More... | |
$enableNoTargetMagicWord | |
Whether to enable the NOAUTOLINKTARGET magic word which prevents a potential target page from being linked to. | |
$specialPageReloadAfter | |
$sameNamespace | |
Whether to link to pages in the same namespace (default is true). | |
$enableConsoleOutput | |
$enableDebugConsoleOutput | |
Private Attributes | |
$dbType | |
Caches the global $wgDBtype variable. | |
Holds LinkTitles configuration.
This class encapsulates the global configuration variables so we do not have to pull those globals into scope in the individual LinkTitles classes.
Using a dedicated configuration class also facilitates overriding certain options, i.e. in a maintenance script that is invoked with flags from the command line.
Definition at line 37 of file Config.php.
LinkTitles\Config::__construct | ( | ) |
Constructs a new Config object.
The object's member variables will automatically be set with the values from the corresponding global variables.
Definition at line 196 of file Config.php.
LinkTitles\Config::sqliteDatabase | ( | ) |
Determines whether the MediaWiki database is SQLITE by inspecting the $wgDBtype variable (which is cached in $this->dbType).
Definition at line 186 of file Config.php.
Array LinkTitles\Config::$blackList |
Array of page titles that must never be link targets.
This may be useful to exclude common abbreviations or acronyms from automatic linking.
Definition at line 69 of file Config.php.
bool LinkTitles\Config::$checkRedirect |
Whether to check if a potential target page links back to the source page.
Set this to true to avoid indirect linkbacks.
Definition at line 150 of file Config.php.
bool LinkTitles\Config::$skipTemplates |
Whether or not to skip templates.
If set to true, text inside transclusions will not be linked.
Definition at line 136 of file Config.php.
bool LinkTitles\Config::$smartMode |
Indicates whether to operate in smart mode, i.e.
link to pages even if the case does not match. Without smart mode, pages are linked to only if the exact title appears on the source page.
Definition at line 98 of file Config.php.
bool LinkTitles\Config::$wordEndOnly |
Whether or not to link to pages only if the page title appears at the end of a word on the target page (i.e., link 'MediaWiki' to a page 'Wiki', but not to a page 'Media').
Set both $wordStartOnly and $wordEndOnly to true to enforce matching whole titles.
Definition at line 129 of file Config.php.
bool LinkTitles\Config::$wordStartOnly |
Whether or not to link to pages only if the page title appears at the start of a word on the target page (i.e., link 'MediaWiki' to a page 'Media', but not to a page 'Wiki').
Set both $wordStartOnly and $wordEndOnly to true to enforce matching whole titles.
Definition at line 117 of file Config.php.