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

Documentation generated on Tue, 12 Mar 2019 21:49:17 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.