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

Source for file Blockquote.php

Documentation is available at Blockquote.php

  1. <?php
  2.  
  3.     
  4.     /**
  5.     * 
  6.     * Renders a token into text matching the requested format.
  7.     * 
  8.     * @access public
  9.     * 
  10.     * @param array $options The "options" portion of the token (second
  11.     *  element).
  12.     * 
  13.     * @return string The text rendered from the token options.
  14.     * 
  15.     */
  16.     
  17.     function token($options)
  18.     {
  19.         $type $options['type'];
  20.         $level $options['level'];
  21.     
  22.         // set up indenting so that the results look nice; we do this
  23.         // in two steps to avoid str_pad mathematics.  ;-)
  24.         $pad str_pad(''$level + 1"\t");
  25.         $pad str_replace("\t"'    '$pad);
  26.         
  27.         // starting
  28.         if ($type == 'start'{
  29.             return "\n$pad";
  30.         }
  31.         
  32.         // ending
  33.         if ($type == 'end'{
  34.             return "\n$pad";
  35.         }
  36.     }
  37. }
  38. ?>

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