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

Source for file Blockquote.php

Documentation is available at Blockquote.php

  1. <?php
  2.  
  3. class Text_Wiki_Render_Creole_Blockquote extends Text_Wiki_Render {
  4.  
  5.     var $css_stack = array();
  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.         // starting
  23.         if ($options['type'== 'start'{
  24.             if (empty($options['css'])) $options['css''';
  25.             array_push($this->css_stack$options['css']);
  26.             $this->wiki->registerRenderCallback(array(&$this'renderInsideText'));
  27.             return '';
  28.         }
  29.         // ending
  30.         if ($options['type'== 'end'{
  31.             $this->wiki->popRenderCallback();
  32.             return '';
  33.         }
  34.     }
  35.  
  36.     function renderInsideText($text{
  37.         $text trim($text);
  38.         if (array_pop($this->css_stack== 'remark'{
  39.             $text preg_replace('/(^|\n)([\>\:]*) */''\1:\2 '$text);
  40.         }
  41.         else {
  42.             $text preg_replace('/(^|\n)([\>\:]*) */''\1>\2 '$text);
  43.         }
  44.         return $text "\n\n";
  45.     }
  46. }
  47. ?>

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