Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
248 jpm 1
<?php
2
// $Id: Raw.php,v 1.1 2005-01-20 19:43:20 jpm 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
class Text_Wiki_Parse_Raw extends Text_Wiki_Parse {
18
 
19
 
20
    /**
21
    *
22
    * The regular expression used to find source text matching this
23
    * rule.
24
    *
25
    * @access public
26
    *
27
    * @var string
28
    *
29
    */
30
 
31
    var $regex = "/``(.*)``/U";
32
 
33
 
34
    /**
35
    *
36
    * Generates a token entry for the matched text.  Token options are:
37
    *
38
    * 'text' => The full matched text.
39
    *
40
    * @access public
41
    *
42
    * @param array &$matches The array of matches from parse().
43
    *
44
    * @return A delimited token number to be used as a placeholder in
45
    * the source text.
46
    *
47
    */
48
 
49
    function process(&$matches)
50
    {
51
        $options = array('text' => $matches[1]);
52
        return $this->wiki->addToken($this->rule, $options);
53
    }
54
}
55
?>