aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc/ParserMode/Base.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2018-04-28 12:12:06 +0200
committerAndreas Gohr <andi@splitbrain.org>2018-04-28 12:12:06 +0200
commit36dc94bb8b05aaaff6fdcf55dd6af80ca30d22b1 (patch)
treec3f463108ed11ef8e05aab892ceaa16c1b50e6b8 /inc/ParserMode/Base.php
parentde369923ccbbc3c1e79fd7b4d03677397e03876a (diff)
downloaddokuwiki-36dc94bb8b05aaaff6fdcf55dd6af80ca30d22b1.tar.gz
dokuwiki-36dc94bb8b05aaaff6fdcf55dd6af80ca30d22b1.zip
split out parser modes into their own files
This moves all the parser classes into their own namespace and files. Next up are the handler classes. I'm not sure about the namespace, yet. A nested namepspace Parser\Modes would probably make more sense... we'll see. This also removes the duplicated coded in the Plugin mode. We now use the plugin trait and can inherit from AbstractMode instead.
Diffstat (limited to 'inc/ParserMode/Base.php')
-rw-r--r--inc/ParserMode/Base.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/inc/ParserMode/Base.php b/inc/ParserMode/Base.php
new file mode 100644
index 000000000..e399bbfd4
--- /dev/null
+++ b/inc/ParserMode/Base.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace dokuwiki\ParserMode;
+
+class Base extends AbstractMode
+{
+
+ /**
+ * Base constructor.
+ */
+ public function __construct()
+ {
+ global $PARSER_MODES;
+
+ $this->allowedModes = array_merge(
+ $PARSER_MODES['container'],
+ $PARSER_MODES['baseonly'],
+ $PARSER_MODES['paragraphs'],
+ $PARSER_MODES['formatting'],
+ $PARSER_MODES['substition'],
+ $PARSER_MODES['protected'],
+ $PARSER_MODES['disabled']
+ );
+ }
+
+ /** @inheritdoc */
+ public function getSort()
+ {
+ return 0;
+ }
+}