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

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