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

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