MediaWiki fundraising/REL1_35
|
Public Member Functions | |
__construct (Parser $parent, ILanguageConverter $languageConverter=null, HookContainer $hookContainer=null) | |
__destruct () | |
Reduce memory usage to reduce the impact of circular references. | |
clear () | |
Clear all stored link holders. | |
isBig () | |
Returns true if the memory requirements of this object are getting large. | |
makeHolder (Title $nt, $text='', $trail='', $prefix='') | |
Make a link placeholder. | |
merge ( $other) | |
Merge another LinkHolderArray into this one. | |
replace (&$text) | |
Replace link placeholders with actual links, in the buffer. | |
replaceText ( $text) | |
Replace and link placeholders with plain text of links (not HTML-formatted). | |
Public Attributes | |
array[][] | $internals = [] |
array[] | $interwikis = [] |
Parser | $parent |
int | $size = 0 |
Protected Member Functions | |
doVariants (&$colours) | |
Modify $this->internals and $colours according to language variant linking rules. | |
replaceInternal (&$text) | |
Replace internal links SecurityCheck-XSS Gets confused with $entry['pdbk']. | |
replaceInterwiki (&$text) | |
Replace interwiki links. | |
Private Attributes | |
HookRunner | $hookRunner |
ILanguageConverter | $languageConverter |
Current language converter. | |
Definition at line 33 of file LinkHolderArray.php.
LinkHolderArray::__construct | ( | Parser | $parent, |
ILanguageConverter | $languageConverter = null, | ||
HookContainer | $hookContainer = null ) |
Parser | $parent | |
ILanguageConverter | null | $languageConverter | |
HookContainer | null | $hookContainer |
Definition at line 62 of file LinkHolderArray.php.
References $languageConverter, $parent, and wfDeprecated().
LinkHolderArray::__destruct | ( | ) |
Reduce memory usage to reduce the impact of circular references.
Definition at line 83 of file LinkHolderArray.php.
LinkHolderArray::clear | ( | ) |
Clear all stored link holders.
Make sure you don't have any text left using these link holders, before you call this
Definition at line 119 of file LinkHolderArray.php.
|
protected |
Modify $this->internals and $colours according to language variant linking rules.
array | &$colours |
Definition at line 344 of file LinkHolderArray.php.
References $dbr, $s, $title, DB_REPLICA, Title\getNamespace(), NS_CATEGORY, NS_SPECIAL, and wfGetDB().
Referenced by replaceInternal().
LinkHolderArray::isBig | ( | ) |
Returns true if the memory requirements of this object are getting large.
Definition at line 110 of file LinkHolderArray.php.
References $wgLinkHolderBatchSize.
LinkHolderArray::makeHolder | ( | Title | $nt, |
$text = '', | |||
$trail = '', | |||
$prefix = '' ) |
Make a link placeholder.
The text returned can be later resolved to a real link with replaceLinkHolders(). This is done for two reasons: firstly to avoid further parsing of interwiki links, and secondly to allow all existence checks and article length checks (for stub links) to be bundled into a single query.
Title | $nt | |
string | $text | |
string | $trail | [optional] |
string | $prefix | [optional] |
Definition at line 137 of file LinkHolderArray.php.
References Title\getNamespace(), Title\getPrefixedDBkey(), Title\isExternal(), and Linker\splitTrail().
LinkHolderArray::merge | ( | $other | ) |
Merge another LinkHolderArray into this one.
LinkHolderArray | $other |
Definition at line 94 of file LinkHolderArray.php.
LinkHolderArray::replace | ( | & | $text | ) |
Replace link placeholders with actual links, in the buffer.
string | &$text |
Definition at line 165 of file LinkHolderArray.php.
References replaceInternal(), and replaceInterwiki().
|
protected |
Replace internal links SecurityCheck-XSS Gets confused with $entry['pdbk'].
string | &$text |
Definition at line 175 of file LinkHolderArray.php.
References $dbr, $matches, $res, $s, $title, DB_REPLICA, doVariants(), Linker\makeSelfLinkObj(), NS_SPECIAL, and wfGetDB().
Referenced by replace().
|
protected |
Replace interwiki links.
string | &$text | SecurityCheck-XSS Gets confused with $this->interwikis['pdbk'] |
Definition at line 314 of file LinkHolderArray.php.
References $matches.
Referenced by replace().
LinkHolderArray::replaceText | ( | $text | ) |
Replace and link placeholders with plain text of links (not HTML-formatted).
string | $text |
Definition at line 505 of file LinkHolderArray.php.
References $matches.
|
private |
Definition at line 55 of file LinkHolderArray.php.
array [][] LinkHolderArray::$internals = [] |
Definition at line 35 of file LinkHolderArray.php.
array [] LinkHolderArray::$interwikis = [] |
Definition at line 37 of file LinkHolderArray.php.
|
private |
Current language converter.
Definition at line 50 of file LinkHolderArray.php.
Referenced by __construct().
Parser LinkHolderArray::$parent |
Definition at line 44 of file LinkHolderArray.php.
Referenced by __construct().
int LinkHolderArray::$size = 0 |
Definition at line 39 of file LinkHolderArray.php.