[ Index ] |
|
Code source de Serendipity 1.2 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 345 lignes (10 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
Text_Wiki_Rule:: (7 méthodes):
Text_Wiki_Rule()
addToken()
setToken()
parse()
process()
renderXhtml()
getMacroArgs()
Classe: Text_Wiki_Rule - X-Ref
Baseline rule class for extension into a "real" wiki rule.Text_Wiki_Rule(&$obj, $name) X-Ref |
Constructor for the rule. param: object &$obj The calling "parent" Text_Wiki object. param: string $name The token name to use for this rule. |
addToken($options = array() X-Ref |
Add a token to the Text_Wiki tokens array, and return a delimited token number. param: array $options An associative array of options for the new param: boolean $id_only If true, return only the token number, not return: string|int By default, return the number of the |
setToken($id, $rule = null, $options = array() X-Ref |
Set or re-set a token with specific information, overwriting any previous rule name and rule options. param: int $id The token number to reset. param: int $rule The rule name to use; by default, use the current param: array $options An associative array of options for the return: void |
parse() X-Ref |
Simple parsing method to apply the rule's regular expression to the source text, pass every match to the process() method, and replace the matched text with the results of the processing. |
process(&$matches) X-Ref |
Simple processing mathod to take matched text and generate replacement text. This is one of the methods you will definitely want to override in your rule class extensions. param: array $matches An array of matches from the parse() method return: string The processed text replacement; defaults to the |
renderXhtml($options) X-Ref |
Simple rendering method to take a set of token options and generate replacement text for it. This is another method you will definitely want to override in your rule subclass extensions. param: array $options The "options" portion of the token (second element). return: string The text rendered from the token options; by default, |
getMacroArgs($text) X-Ref |
Simple method to extract 'option="value"' portions of wiki markup, typically used only in macros. 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. param: string $text The "macro options" portion of macro markup. return: array An associative array of key-value pairs where the |
Généré le : Sat Nov 24 09:00:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |