LinkHolderArray Class Reference

List of all members.

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)


Detailed Description

Definition at line 3 of file LinkHolderArray.php.


Constructor & Destructor Documentation

LinkHolderArray::__construct ( parent  ) 

Definition at line 8 of file LinkHolderArray.php.

References $parent.

LinkHolderArray::__destruct (  ) 

Reduce memory usage to reduce the impact of circular references.

Definition at line 15 of file LinkHolderArray.php.

References $name.


Member Function Documentation

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]

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).

Parameters:
string $text
Returns:
string

Definition at line 406 of file LinkHolderArray.php.

References $text, wfProfileIn(), and wfProfileOut().

LinkHolderArray::replaceTextCallback ( matches  )  [private]

Parameters:
array $matches
Returns:
string

Definition at line 423 of file LinkHolderArray.php.

References $key, $ns, and $type.


Member Data Documentation

LinkHolderArray::$internals = array()

Definition at line 4 of file LinkHolderArray.php.

LinkHolderArray::$interwikis = array()

Definition at line 4 of file LinkHolderArray.php.

LinkHolderArray::$parent

Definition at line 6 of file LinkHolderArray.php.

Referenced by __construct().

LinkHolderArray::$size = 0

Definition at line 5 of file LinkHolderArray.php.


The documentation for this class was generated from the following file:

Generated on Sat Sep 5 02:08:41 2009 for MediaWiki by  doxygen 1.5.9