5 * Find source text marked for lookup in the PHP online manual.
11 * @author Paul M. Jones <pmjones@php.net>
15 * @version $Id: Phplookup.php,v 1.3 2005/02/23 17:38:29 pmjones Exp $
21 * Find source text marked for lookup in the PHP online manual.
27 * @author Paul M. Jones <pmjones@php.net>
31 class Text_Wiki_Parse_Phplookup
extends Text_Wiki_Parse
{
36 * The regular expression used to parse the source text and find
37 * matches conforming to this rule. Used by the parse() method.
47 var $regex = "/\[\[php (.+?)\]\]/";
52 * Generates a replacement for the matched text. Token options are:
54 * 'type' => ['start'|'end'] The starting or ending point of the
55 * teletype text. The text itself is left in the source.
59 * @param array &$matches The array of matches from parse().
61 * @return string A pair of delimited tokens to be used as a
62 * placeholder in the source text surrounding the teletype text.
66 function process(&$matches)
68 return $this->wiki
->addToken(
69 $this->rule
, array('text' => $matches[1])