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

Source for file Html.php

Documentation is available at Html.php

  1. <?php
  2. // $Id: Html.php,v 1.2 2004/09/25 19:05:13 pmjones Exp $
  3.  
  4.  
  5. /**
  6. * 
  7. * This class implements a Text_Wiki_Parse to find source text marked as
  8. * HTML to be redndred as-is.  The block start is marked by <html> on its
  9. * own line, and the block end is marked by </html> on its own line.
  10. *
  11. * @author Paul M. Jones <pmjones@ciaweb.net>
  12. *
  13. * @package Text_Wiki
  14. *
  15. */
  16.  
  17.     
  18.     
  19.     /**
  20.     * 
  21.     * The regular expression used to parse the source text and find
  22.     * matches conforming to this rule.  Used by the parse() method.
  23.     * 
  24.     * @access public
  25.     * 
  26.     * @var string 
  27.     * 
  28.     * @see parse()
  29.     * 
  30.     */
  31.     
  32.     var $regex = '/^\<html\>\n(.+)\n\<\/html\>(\s|$)/Umsi';
  33.     
  34.     
  35.     /**
  36.     * 
  37.     * Generates a replacement for the matched text.  Token options are:
  38.     * 
  39.     * 'text' => The text of the HTML to be rendered as-is.
  40.     * 
  41.     * @access public
  42.     *
  43.     * @param array &$matches The array of matches from parse().
  44.     *
  45.     * @return A delimited token to be used as a placeholder in
  46.     *  the source text, plus any text following the HTML block.
  47.     *
  48.     */
  49.     
  50.     function process(&$matches)
  51.     {    
  52.         $options = array('text' => $matches[1]);
  53.         return $this->wiki->addToken($this->rule, $options) . $matches[2];
  54.     }
  55. }
  56. ?>

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