cvs: pear /Text_Wiki/Text/Wiki Rule.php

From: Date: Sat, 22 May 2004 20:29:39 +0000
Subject: cvs: pear /Text_Wiki/Text/Wiki Rule.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-19764@lists.php.net to get a copy of this message
pmjones Sat May 22 16:29:39 2004 EDT Modified files: /pear/Text_Wiki/Text/Wiki Rule.php Log: added renderPlain() stub method http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Rule.php?r1=1.2&r2=1.3&ty=u Index: pear/Text_Wiki/Text/Wiki/Rule.php diff -u pear/Text_Wiki/Text/Wiki/Rule.php:1.2 pear/Text_Wiki/Text/Wiki/Rule.php:1.3 --- pear/Text_Wiki/Text/Wiki/Rule.php:1.2 Sun May 2 09:13:16 2004 +++ pear/Text_Wiki/Text/Wiki/Rule.php Sat May 22 16:29:38 2004 @@ -16,7 +16,7 @@ // | Authors: Paul M. Jones <pmjones@ciaweb.net> | // +----------------------------------------------------------------------+ // -// $Id: Rule.php,v 1.2 2004/05/02 13:13:16 pmjones Exp $ +// $Id: Rule.php,v 1.3 2004/05/22 20:29:38 pmjones Exp $ /** * @@ -271,8 +271,10 @@ /** * + * Abstract method to render XHTML. + * * Simple rendering method to take a set of token options and - * generate replacement text for it. This is another method you will + * generate replacement XHTML for it. This is another method you will * definitely want to override in your rule subclass extensions. * * @access public @@ -292,6 +294,34 @@ /** * + * Abstract method to render plain text, no markup at all. + * + * Simple rendering method to take a set of token options and + * generate replacement plain (no markup) text for it. This is + * another method you will definitely want to override in your rule + * subclass extensions. + * + * @access public + * + * @param array $options The "options" portion of the token (second element). + * + * @return string The text rendered from the token options; by default, + * no text is returned. You should change this in your subclass. ;-) + * + */ + + function renderPlain($options) + { + if (isset($options['text'])) { + return $options['text'] . ' '; + } else { + return ''; + } + } + + + /** + * * Simple method to extract 'option="value"' portions of wiki markup, * typically used only in macros. *

« previous php.pear.cvs (#19764) next »