includes/wikiengine/Render/Plain/Titlebar.php
changeset 1 fe660c52c48f
equal deleted inserted replaced
0:902822492a68 1:fe660c52c48f
       
     1 <?php
       
     2 // vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4:
       
     3 /**
       
     4  * Titlebar rule end renderer for Plain
       
     5  *
       
     6  * PHP versions 4 and 5
       
     7  *
       
     8  * @category   Text
       
     9  * @package    Text_Wiki
       
    10  * @author     Bertrand Gugger <bertrand@toggg.com>
       
    11  * @copyright  2005 bertrand Gugger
       
    12  * @license    http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
       
    13  * @version    CVS: $Id: Titlebar.php,v 1.1 2005/08/15 11:36:55 toggg Exp $
       
    14  * @link       http://pear.php.net/package/Text_Wiki
       
    15  */
       
    16 
       
    17 /**
       
    18  * This class renders a title bar in Plain.
       
    19  *
       
    20  * @category   Text
       
    21  * @package    Text_Wiki
       
    22  * @author     Bertrand Gugger <bertrand@toggg.com>
       
    23  * @copyright  2005 bertrand Gugger
       
    24  * @license    http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
       
    25  * @version    Release: @package_version@
       
    26  * @link       http://pear.php.net/package/Text_Wiki
       
    27  */
       
    28 class Text_Wiki_Render_Plain_Titlebar extends Text_Wiki_Render {
       
    29 
       
    30     /**
       
    31     *
       
    32     * Renders a token into text matching the requested format.
       
    33     *
       
    34     * @access public
       
    35     *
       
    36     * @param array $options The "options" portion of the token (second
       
    37     * element).
       
    38     *
       
    39     * @return string The text rendered from the token options.
       
    40     *
       
    41     */
       
    42 
       
    43     function token($options)
       
    44     {
       
    45         if ($options['type'] == 'start') {
       
    46             return '***** ';
       
    47         }
       
    48 
       
    49         if ($options['type'] == 'end') {
       
    50             return " *****\n";
       
    51         }
       
    52     }
       
    53 }
       
    54 ?>