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

Source for file List.php

Documentation is available at List.php

  1. <?php
  2.  
  3. class Text_Wiki_Render_Tiki_List extends Text_Wiki_Render {
  4.     
  5.     /**
  6.     * 
  7.     * Renders a token into text matching the requested format.
  8.     * 
  9.     * This rendering method is syntactically and semantically compliant
  10.     * with XHTML 1.1 in that sub-lists are part of the previous list item.
  11.     * 
  12.     * @access public
  13.     * 
  14.     * @param array $options The "options" portion of the token (second
  15.     *  element).
  16.     * 
  17.     * @return string The text rendered from the token options.
  18.     * 
  19.     */
  20.     
  21.     function token($options)
  22.     {
  23.         // make nice variables (type, level, count)
  24.         
  25.         switch ($options['type']{
  26.         
  27.         case 'bullet_list_start':
  28.         case 'number_list_start':
  29.             return '';
  30.             break;
  31.         case 'bullet_list_end':
  32.         case 'number_list_end':
  33.             if ($options['level'== 0{
  34.                 return "\n";
  35.             }
  36.             break;
  37.         case 'bullet_item_start':
  38.             return str_pad(''$options['level']'*');
  39.             break;
  40.         case 'number_item_start':
  41.             return str_pad(''$options['level']'#');
  42.             break;
  43.         case 'bullet_item_end':
  44.         case 'number_item_end':
  45.         default:
  46.             return "\n";
  47.             break;
  48.         }
  49.     }
  50. }
  51. ?>

Documentation generated on Mon, 11 Mar 2019 15:32:44 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.