[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Holder of replacement pairs for wiki links This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
File Size: | 680 lines (20 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
LinkHolderArray:: (17 methods):
__construct()
__destruct()
__sleep()
__wakeup()
merge()
mergeForeign()
mergeForeignCallback()
getSubArray()
isBig()
clear()
makeHolder()
replace()
replaceInternal()
replaceInterwiki()
doVariants()
replaceText()
replaceTextCallback()
Class: LinkHolderArray - X-Ref
__construct( $parent ) X-Ref |
param: Parser $parent |
__destruct() X-Ref |
Reduce memory usage to reduce the impact of circular references |
__sleep() X-Ref |
Don't serialize the parent object, it is big, and not needed when it is a parameter to mergeForeign(), which is the only application of serializing at present. Compact the titles, only serialize the text form. return: array |
__wakeup() X-Ref |
Recreate the Title objects |
merge( $other ) X-Ref |
Merge another LinkHolderArray into this one param: LinkHolderArray $other |
mergeForeign( $other, $texts ) X-Ref |
Merge a LinkHolderArray from another parser instance into this one. The keys will not be preserved. Any text which went with the old LinkHolderArray and needs to work with the new one should be passed in the $texts array. The strings in this array will have their link holders converted for use in the destination link holder. The resulting array of strings will be returned. param: LinkHolderArray $other param: array $texts Array of strings return: array |
mergeForeignCallback( $m ) X-Ref |
param: array $m return: string |
getSubArray( $text ) X-Ref |
Get a subset of the current LinkHolderArray which is sufficient to interpret the given text. param: string $text return: LinkHolderArray |
isBig() X-Ref |
Returns true if the memory requirements of this object are getting large return: bool |
clear() X-Ref |
Clear all stored link holders. Make sure you don't have any text left using these link holders, before you call this |
makeHolder( $nt, $text = '', $query = array() X-Ref |
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. param: Title $nt param: string $text param: array $query [optional] param: string $trail [optional] param: string $prefix [optional] return: string |
replace( &$text ) X-Ref |
Replace <!--LINK--> link placeholders with actual links, in the buffer param: string $text return: array Array of link CSS classes, indexed by PDBK. |
replaceInternal( &$text ) X-Ref |
Replace internal links param: string $text |
replaceInterwiki( &$text ) X-Ref |
Replace interwiki links param: string $text |
doVariants( &$colours ) X-Ref |
Modify $this->internals and $colours according to language variant linking rules param: array $colours |
replaceText( $text ) X-Ref |
Replace <!--LINK--> link placeholders with plain text of links (not HTML-formatted). param: string $text return: string |
replaceTextCallback( $matches ) X-Ref |
Callback for replaceText() param: array $matches return: string |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |