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

Source for file Table.php

Documentation is available at Table.php

  1. <?php
  2.  
  3. class Text_Wiki_Render_CoWiki_Table extends Text_Wiki_Render {
  4.     
  5.     /**
  6.     * 
  7.     * Renders a token into text matching the requested format.
  8.     * 
  9.     * @access public
  10.     * 
  11.     * @param array $options The "options" portion of the token (second
  12.     *  element).
  13.     * 
  14.     * @return string The text rendered from the token options.
  15.     * 
  16.     */
  17.     
  18.     function token($options)
  19.     {
  20.         // make nice variable names (type, attr, span)
  21.         $pad '    ';
  22.         
  23.         switch ($options['type']{
  24.         
  25.         case 'table_start':
  26.             return "\n<table>";
  27.             break;
  28.         
  29.         case 'table_end':
  30.             return "\n</table>";
  31.             break;
  32.         
  33.         case 'row_start':
  34.             return "\n";
  35.             break;
  36.         
  37.         case 'row_end':
  38.             return '';
  39.             break;
  40.         
  41.         case 'cell_start':
  42.             return str_pad(''$options['span']'|').' ';
  43.             break;
  44.  
  45.         case 'cell_end':
  46.             return ' ';
  47.             break;
  48.         
  49.         default:
  50.             return '';
  51.         
  52.         }
  53.     }
  54. }
  55. ?>

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