summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2014-01-07 19:16:54 +0100
committerAndreas Gohr <andi@splitbrain.org>2014-01-07 19:16:54 +0100
commit72d89f96f31af5c92f96fa16f0d1adf15c0bf4e8 (patch)
tree24dc91a1ccc04907e6ff1fa03cc7bffd37e2b206 /inc
parent1253a9dc24315481f9abf698836da72a503d5450 (diff)
downloadrpg-72d89f96f31af5c92f96fa16f0d1adf15c0bf4e8.tar.gz
rpg-72d89f96f31af5c92f96fa16f0d1adf15c0bf4e8.tar.bz2
remove duplicate plugin code for syntax plugins
This makes Doku_Parser_Mode inherit from DokuWiki_Plugin which allows for the removal of a bunch of duplicate code form DokuWiki_Syntax_Plugin. This makes the code easier to maintain and makes sure all DokuWiki plugins are actual instances of DokuWiki_Plugin. However this adds a bunch of functions to the "normal" parser modes that don't need them which could have performance/RAM implications.
Diffstat (limited to 'inc')
-rw-r--r--inc/parser/parser.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/inc/parser/parser.php b/inc/parser/parser.php
index 1f14b98a3..43a1c22fa 100644
--- a/inc/parser/parser.php
+++ b/inc/parser/parser.php
@@ -126,16 +126,14 @@ class Doku_Parser {
//-------------------------------------------------------------------
/**
- * This class and all the subclasses below are
- * used to reduce the effort required to register
- * modes with the Lexer. For performance these
- * could all be eliminated later perhaps, or
- * the Parser could be serialized to a file once
- * all modes are registered
+ * This class and all the subclasses below are used to reduce the effort required to register
+ * modes with the Lexer.
+ *
+ * Inherits from DokuWiki_Plugin for giving additional functions to syntax plugins
*
* @author Harry Fuecks <hfuecks@gmail.com>
*/
-class Doku_Parser_Mode {
+class Doku_Parser_Mode extends DokuWiki_Plugin {
/**
* @var Doku_Lexer $Lexer