$conf
$conf : string
Configuration options for this parser rule.
Parses for interwiki links.
This class implements a Text_Wiki_Parse to find source text marked as an Interwiki link. See the regex for a detailed explanation of the text matching procedure; e.g., "InterWikiName:PageName".
process(array $matches) : string
Abstract method to generate replacements for matched text.
array | $matches | An array of matches from the parse() method as generated by preg_replace_callback. $matches[0] is the full matched string, $matches[1] is the first matched pattern, $matches[2] is the second matched pattern, and so on. |
The processed text replacement; defaults to the full matched string (i.e., no changes to the text).
getConf(string $key, mixed $default = null) : mixed
Simple method to safely get configuration key values.
string | $key | The configuration key. |
mixed | $default | If the key does not exist, return this value instead. |
The configuration key value (if it exists) or the default value (if not).
getAttrs(string $text) : array
Extract 'attribute="value"' portions of wiki markup.
This kind of markup is typically used only in macros, but is useful anywhere.
The syntax is pretty strict; there can be no spaces between the option name, the equals, and the first double-quote; the value must be surrounded by double-quotes. You can escape characters in the value with a backslash, and the backslash will be stripped for you.
string | $text | The "attributes" portion of markup. |
An associative array of key-value pairs where the key is the option name and the value is the option value.
processDescr( $matches) : \A
Generates a replacement for described interwiki links. Token options are:
'site' => The key name for the Text_Wiki interwiki array map, usually the name of the interwiki site.
'page' => The page on the target interwiki to link to.
'text' => The text to display as the link.
$matches |
delimited token to be used as a placeholder in the source text, plus any text priot to the match.