1<?php
2/**
3 * DokuWiki Plugin parserarray (Renderer Component)
4 *
5 * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
6 * @author  H�kan Sandell <sandell.hakan@gmail.com>
7 */
8
9// must be run within Dokuwiki
10if (!defined('DOKU_INC')) die();
11
12if (!defined('DOKU_LF')) define('DOKU_LF', "\n");
13if (!defined('DOKU_TAB')) define('DOKU_TAB', "\t");
14require_once DOKU_INC.'inc/parser/renderer.php';
15
16class renderer_plugin_parserarray extends Doku_Renderer {
17
18    /**
19     * The format this renderer produces
20     */
21    public function getFormat(){
22        return 'parserarray';
23    }
24
25    function document_end() {
26        global $ID;
27        $id = $ID;
28        $instructions = p_cached_instructions(wikiFN($id),false,$id);
29
30        $this->doc .= '<pre>';
31        ob_start();
32        print_r($instructions);
33        $this->doc .= hsc(ob_end_clean());
34        $this->doc .= '</pre>';
35    }
36}
37
38