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

Source for file Deflist.php

Documentation is available at Deflist.php

  1. <?php
  2.  
  3. class Text_Wiki_Render_Tiki_Deflist extends Text_Wiki_Render {
  4.     
  5.     /**
  6.      * The last token type rendered
  7.      *
  8.      * @var string 
  9.      */
  10.     var $last '';
  11.  
  12.     /**
  13.     * 
  14.     * Renders a token into text matching the requested format.
  15.     * 
  16.     * @access public
  17.     * 
  18.     * @param array $options The "options" portion of the token (second
  19.     *  element).
  20.     * 
  21.     * @return string The text rendered from the token options.
  22.     * 
  23.     */
  24.     
  25.     function token($options)
  26.     {
  27.         $type $options['type'];
  28.  
  29.         switch ($type{
  30.         
  31.         case 'list_start':
  32.             $output "{DL()}\n";
  33.             break;
  34.         
  35.         case 'list_end':
  36.             $output "{DL}\n\n";
  37.             break;
  38.         
  39.         case 'term_start':
  40.             // support definition item without narrative
  41.             if ($this->last == 'term_end')
  42.                 $output "\n";
  43.             else
  44.                 $output '';
  45.             break;
  46.         
  47.         case 'term_end':
  48.             $output ": ";
  49.             break;
  50.         
  51.         case 'narr_start':
  52.             $output '';
  53.             break;
  54.         
  55.         case 'narr_end':
  56.             $output "\n";
  57.             break;
  58.         
  59.         default:
  60.             $output '';
  61.         
  62.         }
  63.  
  64.         $this->last $type;
  65.         return $output;
  66.     }
  67. }
  68. ?>

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