summaryrefslogtreecommitdiff
path: root/includes/pear/Text/Wiki/Parse/Default/Center.php
diff options
context:
space:
mode:
authorspiderr <spiderr@bitweaver.org>2018-07-31 23:49:37 -0400
committerspiderr <spiderr@bitweaver.org>2018-07-31 23:49:37 -0400
commita2f342591712f07923ea53740778724fbe7e2b32 (patch)
tree798bf395b510f45b49226aa816ccd191d48dbc47 /includes/pear/Text/Wiki/Parse/Default/Center.php
parent4a945905298ba6173c2f53dfac5fe5fcffa3fb84 (diff)
downloadutil-a2f342591712f07923ea53740778724fbe7e2b32.tar.gz
util-a2f342591712f07923ea53740778724fbe7e2b32.tar.bz2
util-a2f342591712f07923ea53740778724fbe7e2b32.zip
major reorg and move everything to includes/ and Deny all in .htaccess
Diffstat (limited to 'includes/pear/Text/Wiki/Parse/Default/Center.php')
-rw-r--r--includes/pear/Text/Wiki/Parse/Default/Center.php78
1 files changed, 78 insertions, 0 deletions
diff --git a/includes/pear/Text/Wiki/Parse/Default/Center.php b/includes/pear/Text/Wiki/Parse/Default/Center.php
new file mode 100644
index 0000000..6ddde51
--- /dev/null
+++ b/includes/pear/Text/Wiki/Parse/Default/Center.php
@@ -0,0 +1,78 @@
+<?php
+
+/**
+*
+* Parses for centered lines of text.
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+* @license LGPL
+*
+* @version $Id: Center.php 180591 2005-02-23 17:38:29Z pmjones $
+*
+*/
+
+/**
+*
+* Parses for centered lines of text.
+*
+* This class implements a Text_Wiki_Parse to find lines marked for centering.
+* The line must start with "= " (i.e., an equal-sign followed by a space).
+*
+* @category Text
+*
+* @package Text_Wiki
+*
+* @author Paul M. Jones <pmjones@php.net>
+*
+*/
+
+class Text_Wiki_Parse_Center extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to find source text matching this
+ * rule.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ */
+
+ var $regex = '/\n\= (.*?)\n/';
+
+ /**
+ *
+ * Generates a token entry for the matched text.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return A delimited token number to be used as a placeholder in
+ * the source text.
+ *
+ */
+
+ function process(&$matches)
+ {
+ $start = $this->wiki->addToken(
+ $this->rule,
+ array('type' => 'start')
+ );
+
+ $end = $this->wiki->addToken(
+ $this->rule,
+ array('type' => 'end')
+ );
+
+ return "\n" . $start . $matches[1] . $end . "\n";
+ }
+}
+?> \ No newline at end of file