summaryrefslogtreecommitdiff
path: root/inc/parser/renderer.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/parser/renderer.php')
-rw-r--r--inc/parser/renderer.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php
index 931be6ceb..f9dcaab7b 100644
--- a/inc/parser/renderer.php
+++ b/inc/parser/renderer.php
@@ -1,6 +1,6 @@
<?php
/**
- * Renderer for XHTML output
+ * Renderer output base class
*
* @author Harry Fuecks <hfuecks@gmail.com>
* @author Andreas Gohr <andi@splitbrain.org>
@@ -35,6 +35,23 @@ class Doku_Renderer {
}
}
+ /**
+ * handle nested render instructions
+ * this method (and nest_close method) should not be overloaded in actual renderer output classes
+ */
+ function nest($instructions) {
+
+ foreach ( $instructions as $instruction ) {
+ // execute the callback against ourself
+ call_user_func_array(array(&$this, $instruction[0]),$instruction[1]);
+ }
+ }
+
+ // dummy closing instruction issued by Doku_Handler_Nest, normally the syntax mode should
+ // override this instruction when instantiating Doku_Handler_Nest - however plugins will not
+ // be able to - as their instructions require data.
+ function nest_close() {}
+
function document_start() {}
function document_end() {}