summaryrefslogtreecommitdiff
path: root/includes/pear/Text/Wiki/Render/Xhtml/Center.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/pear/Text/Wiki/Render/Xhtml/Center.php')
-rw-r--r--includes/pear/Text/Wiki/Render/Xhtml/Center.php62
1 files changed, 62 insertions, 0 deletions
diff --git a/includes/pear/Text/Wiki/Render/Xhtml/Center.php b/includes/pear/Text/Wiki/Render/Xhtml/Center.php
new file mode 100644
index 0000000..b563b3f
--- /dev/null
+++ b/includes/pear/Text/Wiki/Render/Xhtml/Center.php
@@ -0,0 +1,62 @@
+<?php
+// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4:
+/**
+ * Center rule end renderer for Xhtml
+ *
+ * PHP versions 4 and 5
+ *
+ * @category Text
+ * @package Text_Wiki
+ * @author Paul M. Jones <pmjones@php.net>
+ * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
+ * @version CVS: $Id: Center.php 230212 2007-02-19 08:51:19Z mic $
+ * @link http://pear.php.net/package/Text_Wiki
+ */
+
+/**
+ * This class renders centered content in XHTML.
+ *
+ * @category Text
+ * @package Text_Wiki
+ * @author Paul M. Jones <pmjones@php.net>
+ * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
+ * @version Release: @package_version@
+ * @link http://pear.php.net/package/Text_Wiki
+ */
+class Text_Wiki_Render_Xhtml_Center extends Text_Wiki_Render {
+
+ var $conf = array(
+ 'css' => null
+ );
+
+ /**
+ *
+ * Renders a token into text matching the requested format.
+ *
+ * @access public
+ *
+ * @param array $options The "options" portion of the token (second
+ * element).
+ *
+ * @return string The text rendered from the token options.
+ *
+ */
+
+ function token($options)
+ {
+ if ($options['type'] == 'start') {
+ $css = $this->getConf('css');
+ if ($css) {
+ return "<div class=\"$css\">";
+ }
+ else {
+ return '<div style="text-align: center;">';
+ }
+ }
+
+ if ($options['type'] == 'end') {
+ return '</div>';
+ }
+ }
+}
+?>