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

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