SMWParserExtensions Class Reference

List of all members.

Static Public Member Functions

static onInternalParseBeforeLinks (Parser &$parser, &$text)
 This method will be called before an article is displayed or previewed.
static simpleParsePropertiesCallback ($semanticLink)
 This callback function strips out the semantic attributes from a wiki link.
static parsePropertiesCallback ($semanticLink)
 This callback function strips out the semantic attributes from a wiki link.

Static Protected Attributes

static $mTempParser
 Temporarily store parser as it cannot be passed to call-back functions otherwise.
static $mTempStoreAnnotations
 Internal state for switching off/on SMW link annotations during parsing.


Detailed Description

Definition at line 12 of file SMW_ParserExtensions.php.


Member Function Documentation

static SMWParserExtensions::onInternalParseBeforeLinks ( Parser &$  parser,
&$  text 
) [static]

This method will be called before an article is displayed or previewed.

For display and preview we strip out the semantic properties and append them at the end of the article.

Parameters:
Parser $parser
string $text
Returns:
true

Definition at line 29 of file SMW_ParserExtensions.php.

References $mTempParser, $mTempStoreAnnotations, $smwgLinksInValues, SMWOutputs::commitToParser(), SMWDIWikiPage::newFromTitle(), SMWOutputs::requireHeadItem(), smwfIsSemanticsProcessed(), and SMWParseData::stripMagicWords().

static SMWParserExtensions::simpleParsePropertiesCallback ( semanticLink  )  [static]

This callback function strips out the semantic attributes from a wiki link.

Expected parameter: array(linktext, properties, value|caption) This function is a preprocessing for smwfParsePropertiesCallback, and takes care of separating value and caption (instead of leaving this to a more complex regexp).

Definition at line 97 of file SMW_ParserExtensions.php.

References parsePropertiesCallback().

static SMWParserExtensions::parsePropertiesCallback ( semanticLink  )  [static]

This callback function strips out the semantic attributes from a wiki link.

Expected parameter: array(linktext, properties, value, caption)

Definition at line 122 of file SMW_ParserExtensions.php.

References $mTempParser, $mTempStoreAnnotations, $smwgInlineErrors, and SMWParseData::addProperty().

Referenced by simpleParsePropertiesCallback().


Member Data Documentation

SMWParserExtensions::$mTempParser [static, protected]

Temporarily store parser as it cannot be passed to call-back functions otherwise.

Definition at line 15 of file SMW_ParserExtensions.php.

Referenced by onInternalParseBeforeLinks(), and parsePropertiesCallback().

SMWParserExtensions::$mTempStoreAnnotations [static, protected]

Internal state for switching off/on SMW link annotations during parsing.

Definition at line 17 of file SMW_ParserExtensions.php.

Referenced by onInternalParseBeforeLinks(), and parsePropertiesCallback().


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

Generated on Sun Mar 18 07:15:43 2012 for Semantic MediaWiki by  doxygen 1.5.6