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

Source for file Raw.php

Documentation is available at Raw.php

  1. <?php
  2. // $Id: Raw.php,v 1.2 2004/09/25 19:05:13 pmjones Exp $
  3.  
  4.  
  5. /**
  6. * This class implements a Text_Wiki rule to find sections of the source
  7. * text that are not to be processed by Text_Wiki.  These blocks of "raw"
  8. * text will be rendered as they were found.
  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 find source text matching this
  21.     * rule.
  22.     * 
  23.     * @access public
  24.     * 
  25.     * @var string 
  26.     * 
  27.     */
  28.     
  29.     var $regex = "/``(.*)``/U";
  30.     
  31.     
  32.     /**
  33.     * 
  34.     * Generates a token entry for the matched text.  Token options are:
  35.     * 
  36.     * 'text' => The full matched text.
  37.     * 
  38.     * @access public
  39.     *
  40.     * @param array &$matches The array of matches from parse().
  41.     *
  42.     * @return delimited token number to be used as a placeholder in
  43.     *  the source text.
  44.     *
  45.     */
  46.     
  47.     function process(&$matches)
  48.     {
  49.         $options = array('text' => $matches[1]);
  50.         return $this->wiki->addToken($this->rule$options);
  51.     }
  52. }
  53. ?>

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