Source for file Center.php
Documentation is available at Center.php
* Parses for centered text.
* This class implements a Text_Wiki_Parse to find source text marked to
* be a center element, as defined by text on a line by itself prefixed
* with an exclamation mark (!).
* The centered text itself is left in the source, but is prefixed and
* suffixed with delimited tokens marking its start and end.
* @author Tomaiuolo Michele <tomamic@yahoo.it>
* @version $Id: Center.php 240476 2007-07-30 14:22:34Z mic $
* The regular expression used to parse the source text and find
* matches conforming to this rule. Used by the parse() method.
* Generates a replacement for the matched text. Token options are:
* 'type' => ['start'|'end'] The starting or ending point of the
* centered text. The text itself is left in the source.
* @param array &$matches The array of matches from parse().
* @return string A pair of delimited tokens to be used as a
* placeholder in the source text surrounding the centered text.
$start = $this->wiki->addToken (
$end = $this->wiki->addToken (
return $start . trim($matches[1 ]) . $end . "\n\n";
Documentation generated on Mon, 11 Mar 2019 15:40:30 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|