Subversion Repositories Applications.papyrus

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
248 jpm 1
<?php
2
// $Id: Horiz.php,v 1.1 2005-01-20 19:43:20 jpm Exp $
3
 
4
 
5
/**
6
*
7
* This class implements a Text_Wiki_Parse to find source text marked to
8
* be a horizontal rule, as defined by four dashed on their own line.
9
*
10
* @author Paul M. Jones <pmjones@ciaweb.net>
11
*
12
* @package Text_Wiki
13
*
14
*/
15
 
16
class Text_Wiki_Parse_Horiz extends Text_Wiki_Parse {
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 = '/^([-]{4,})$/m';
33
 
34
 
35
    /**
36
    *
37
    * Generates a replacement token for the matched text.
38
    *
39
    * @access public
40
    *
41
    * @param array &$matches The array of matches from parse().
42
    *
43
    * @return string A token marking the horizontal rule.
44
    *
45
    */
46
 
47
    function process(&$matches)
48
    {
49
        return $this->wiki->addToken($this->rule);
50
    }
51
}
52
?>