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.     var $conf = array(
  5.         'css' => null
  6.     );
  7.     
  8.     /**
  9.     * 
  10.     * Renders a token into text matching the requested format.
  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.         $type $options['type'];
  24.         $level $options['level'];
  25.     
  26.         // set up indenting so that the results look nice; we do this
  27.         // in two steps to avoid str_pad mathematics.  ;-)
  28.         $pad str_pad(''$level"\t");
  29.         $pad str_replace("\t"'    '$pad);
  30.         
  31.         // pick the css type
  32.         $css $this->formatConf(' class="%s"''css');
  33.         
  34.         // starting
  35.         if ($type == 'start'{
  36.             return "$pad<blockquote$css>";
  37.         }
  38.         
  39.         // ending
  40.         if ($type == 'end'{
  41.             return $pad "</blockquote>\n";
  42.         }
  43.     }
  44. }
  45. ?>

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