Public Member Functions | |
| __construct ($parent) | |
| __destruct () | |
| Reduce memory usage to reduce the impact of circular references. | |
| merge ($other) | |
| Merge another LinkHolderArray into this one. | |
| isBig () | |
| Returns true if the memory requirements of this object are getting large. | |
| clear () | |
| Clear all stored link holders. | |
| makeHolder ($nt, $text= '', $query= '', $trail= '', $prefix= '') | |
| Make a link placeholder. | |
| getStubThreshold () | |
| Get the stub threshold. | |
| replace (&$text) | |
| Replace link placeholders with actual links, in the buffer Placeholders created in Skin::makeLinkObj() Returns an array of link CSS classes, indexed by PDBK. | |
| replaceText ($text) | |
| Replace link placeholders with plain text of links (not HTML-formatted). | |
Public Attributes | |
| $internals = array() | |
| $interwikis = array() | |
| $size = 0 | |
| $parent | |
Protected Member Functions | |
| replaceInternal (&$text) | |
| Replace internal links. | |
| replaceInterwiki (&$text) | |
| Replace interwiki links. | |
| doVariants (&$colours) | |
| Modify $this->internals and $colours according to language variant linking rules. | |
Private Member Functions | |
| replaceTextCallback ($matches) | |
Definition at line 3 of file LinkHolderArray.php.
| LinkHolderArray::__construct | ( | $ | parent | ) |
| LinkHolderArray::__destruct | ( | ) |
Reduce memory usage to reduce the impact of circular references.
Definition at line 15 of file LinkHolderArray.php.
References $name.
| 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 48 of file LinkHolderArray.php.
| LinkHolderArray::doVariants | ( | &$ | colours | ) | [protected] |
Modify $this->internals and $colours according to language variant linking rules.
Definition at line 282 of file LinkHolderArray.php.
References $dbr, $key, $ns, $output, $page, $s, $title, $wgContLang, getStubThreshold(), Title::makeName(), Title::makeTitle(), Title::newFromDBkey(), LinkCache::singleton(), wfGetDB(), and wfRunHooks().
Referenced by replaceInternal().
| LinkHolderArray::getStubThreshold | ( | ) |
Get the stub threshold.
Definition at line 99 of file LinkHolderArray.php.
References $wgUser.
Referenced by doVariants(), and replaceInternal().
| LinkHolderArray::isBig | ( | ) |
Returns true if the memory requirements of this object are getting large.
Definition at line 39 of file LinkHolderArray.php.
References $wgLinkHolderBatchSize.
| LinkHolderArray::makeHolder | ( | $ | nt, | |
| $ | text = '', |
|||
| $ | query = '', |
|||
| $ | 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.
Definition at line 61 of file LinkHolderArray.php.
References $key, $ns, $prefix, Linker::splitTrail(), wfProfileIn(), and wfProfileOut().
| LinkHolderArray::merge | ( | $ | other | ) |
Merge another LinkHolderArray into this one.
Definition at line 24 of file LinkHolderArray.php.
References $ns.
| LinkHolderArray::replace | ( | &$ | text | ) |
Replace link placeholders with actual links, in the buffer Placeholders created in Skin::makeLinkObj() Returns an array of link CSS classes, indexed by PDBK.
Definition at line 112 of file LinkHolderArray.php.
References $text, replaceInternal(), replaceInterwiki(), wfProfileIn(), and wfProfileOut().
| LinkHolderArray::replaceInternal | ( | &$ | text | ) | [protected] |
Replace internal links.
Definition at line 125 of file LinkHolderArray.php.
References $dbr, $key, $ns, $output, $page, $res, $s, $text, $title, $wgContLang, doVariants(), getStubThreshold(), Title::makeTitle(), LinkCache::singleton(), wfGetDB(), wfProfileIn(), wfProfileOut(), and wfRunHooks().
Referenced by replace().
| LinkHolderArray::replaceInterwiki | ( | &$ | text | ) | [protected] |
Replace interwiki links.
Definition at line 258 of file LinkHolderArray.php.
References $key, $text, wfProfileIn(), and wfProfileOut().
Referenced by replace().
| LinkHolderArray::replaceText | ( | $ | text | ) |
Replace link placeholders with plain text of links (not HTML-formatted).
| string | $text |
Definition at line 406 of file LinkHolderArray.php.
References $text, wfProfileIn(), and wfProfileOut().
| LinkHolderArray::replaceTextCallback | ( | $ | matches | ) | [private] |
| LinkHolderArray::$internals = array() |
Definition at line 4 of file LinkHolderArray.php.
| LinkHolderArray::$interwikis = array() |
Definition at line 4 of file LinkHolderArray.php.
| LinkHolderArray::$parent |
| LinkHolderArray::$size = 0 |
Definition at line 5 of file LinkHolderArray.php.
1.5.9