includes/wikiengine/Render/Xhtml/Tt.php
changeset 1027 98c052fc3337
parent 1026 f0431eb8161e
child 1028 dde4416dea00
equal deleted inserted replaced
1026:f0431eb8161e 1027:98c052fc3337
     1 <?php
       
     2 // vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4:
       
     3 /**
       
     4  * Tt rule end renderer for Xhtml
       
     5  *
       
     6  * PHP versions 4 and 5
       
     7  *
       
     8  * @category   Text
       
     9  * @package    Text_Wiki
       
    10  * @author     Paul M. Jones <pmjones@php.net>
       
    11  * @license    http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
       
    12  * @version    CVS: $Id: Tt.php,v 1.7 2005/07/30 08:03:29 toggg Exp $
       
    13  * @link       http://pear.php.net/package/Text_Wiki
       
    14  */
       
    15 
       
    16 /**
       
    17  * This class renders monospaced text in XHTML.
       
    18  *
       
    19  * @category   Text
       
    20  * @package    Text_Wiki
       
    21  * @author     Paul M. Jones <pmjones@php.net>
       
    22  * @license    http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
       
    23  * @version    Release: @package_version@
       
    24  * @link       http://pear.php.net/package/Text_Wiki
       
    25  */
       
    26 class Text_Wiki_Render_Xhtml_Tt extends Text_Wiki_Render {
       
    27 
       
    28 
       
    29     var $conf = array(
       
    30         'css' => null
       
    31     );
       
    32 
       
    33     /**
       
    34     *
       
    35     * Renders a token into text matching the requested format.
       
    36     *
       
    37     * @access public
       
    38     *
       
    39     * @param array $options The "options" portion of the token (second
       
    40     * element).
       
    41     *
       
    42     * @return string The text rendered from the token options.
       
    43     *
       
    44     */
       
    45 
       
    46     function token($options)
       
    47     {
       
    48         if ($options['type'] == 'start') {
       
    49             $css = $this->formatConf(' class="%s"', 'css');
       
    50             return "<tt$css>";
       
    51         }
       
    52 
       
    53         if ($options['type'] == 'end') {
       
    54             return '</tt>';
       
    55         }
       
    56     }
       
    57 }
       
    58 ?>