Text_Wiki
[ class tree: Text_Wiki ] [ index: Text_Wiki ] [ all elements ]

Source for file Colortext.php

Documentation is available at Colortext.php

  1. <?php
  2.  
  3. class Text_Wiki_Render_Latex_Colortext extends Text_Wiki_Render {
  4.     
  5.     var $colors = array(
  6.         'aqua',
  7.         'black',
  8.         'blue',
  9.         'fuchsia',
  10.         'gray',
  11.         'green',
  12.         'lime',
  13.         'maroon',
  14.         'navy',
  15.         'olive',
  16.         'purple',
  17.         'red',
  18.         'silver',
  19.         'teal',
  20.         'white',
  21.         'yellow'
  22.     );
  23.     
  24.     
  25.     /**
  26.     * 
  27.     * Renders a token into text matching the requested format.
  28.     * 
  29.     * @access public
  30.     * 
  31.     * @param array $options The "options" portion of the token (second
  32.     *  element).
  33.     * 
  34.     * @return string The text rendered from the token options.
  35.     * 
  36.     */
  37.     
  38.     function token($options)
  39.     {
  40.         return 'Colortext: NI';
  41.         
  42.         $type $options['type'];
  43.         $color $options['color'];
  44.         
  45.         if (in_array($color$this->colors)) {
  46.             $color '#' $color;
  47.         }
  48.         
  49.         if ($type == 'start'{
  50.             return "<span style=\"color: $color;\">";
  51.         }
  52.         
  53.         if ($options['type'== 'end'{
  54.             return '</span>';
  55.         }
  56.     }
  57. }
  58. ?>

Documentation generated on Mon, 11 Mar 2019 13:56:08 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.