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

Source for file List.php

Documentation is available at List.php

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

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