xref: /dokuwiki/inc/parser/renderer.php (revision 7367b36877bca568d785e01be802652b6a719884)
1<?php
2/**
3 * Renderer for XHTML output
4 *
5 * @author Harry Fuecks <hfuecks@gmail.com>
6 * @author Andreas Gohr <andi@splitbrain.org>
7 */
8if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
9
10require_once DOKU_INC . 'inc/parser/renderer.php';
11require_once DOKU_INC . 'inc/pluginutils.php';
12
13class Doku_Renderer {
14    var $info = array(
15        'cache' => TRUE, // may the rendered result cached?
16    );
17
18
19    function nocache() {
20        $this->info['cache'] = FALSE;
21    }
22
23    //handle plugin rendering
24    function plugin($name,$data){
25        $plugin =& plugin_load('syntax',$name);
26        if($plugin != null){
27			// determine mode from renderer class name - format = "Doku_Renderer_<mode>"
28		    $mode = substr(get_class($this), 14);
29            $plugin->render($mode,$this,$data);
30        }
31    }
32
33    function document_start() {}
34
35    function document_end() {}
36
37    function toc_open() {}
38
39    function tocbranch_open($level) {}
40
41    function tocitem_open($level, $empty = FALSE) {}
42
43    function tocelement($level, $title) {}
44
45    function tocitem_close($level) {}
46
47    function tocbranch_close($level) {}
48
49    function toc_close() {}
50
51    function header($text, $level, $pos) {}
52
53    function section_open($level) {}
54
55    function section_close() {}
56
57    function cdata($text) {}
58
59    function p_open() {}
60
61    function p_close() {}
62
63    function linebreak() {}
64
65    function hr() {}
66
67    function strong_open() {}
68
69    function strong_close() {}
70
71    function emphasis_open() {}
72
73    function emphasis_close() {}
74
75    function underline_open() {}
76
77    function underline_close() {}
78
79    function monospace_open() {}
80
81    function monospace_close() {}
82
83    function subscript_open() {}
84
85    function subscript_close() {}
86
87    function superscript_open() {}
88
89    function superscript_close() {}
90
91    function deleted_open() {}
92
93    function deleted_close() {}
94
95    function footnote_open() {}
96
97    function footnote_close() {}
98
99    function listu_open() {}
100
101    function listu_close() {}
102
103    function listo_open() {}
104
105    function listo_close() {}
106
107    function listitem_open($level) {}
108
109    function listitem_close() {}
110
111    function listcontent_open($level) {}
112
113    function listcontent_close() {}
114
115    function unformatted($text) {}
116
117    function php($text) {}
118
119    function html($text) {}
120
121    function preformatted($text) {}
122
123    function file($text) {}
124
125    function quote_open() {}
126
127    function quote_close() {}
128
129    function code($text, $lang = NULL) {}
130
131    function acronym($acronym) {}
132
133    function smiley($smiley) {}
134
135    function wordblock($word) {}
136
137    function entity($entity) {}
138
139    // 640x480 ($x=640, $y=480)
140    function multiplyentity($x, $y) {}
141
142    function singlequoteopening() {}
143
144    function singlequoteclosing() {}
145
146    function doublequoteopening() {}
147
148    function doublequoteclosing() {}
149
150    // $link like 'SomePage'
151    function camelcaselink($link) {}
152
153    // $link like 'wiki:syntax', $title could be an array (media)
154    function internallink($link, $title = NULL) {}
155
156    // $link is full URL with scheme, $title could be an array (media)
157    function externallink($link, $title = NULL) {}
158
159    // $link is the original link - probably not much use
160    // $wikiName is an indentifier for the wiki
161    // $wikiUri is the URL fragment to append to some known URL
162    function interwikilink($link, $title = NULL, $wikiName, $wikiUri) {}
163
164    // Link to file on users OS, $title could be an array (media)
165    function filelink($link, $title = NULL) {}
166
167    // Link to a Windows share, , $title could be an array (media)
168    function windowssharelink($link, $title = NULL) {}
169
170    function email($address, $title = NULL) {}
171
172    function internalmedialink (
173        $src,$title=NULL,$align=NULL,$width=NULL,$height=NULL,$cache=NULL
174        ) {}
175
176    function externalmedialink(
177        $src,$title=NULL,$align=NULL,$width=NULL,$height=NULL,$cache=NULL
178        ) {}
179
180    function table_open($maxcols = NULL, $numrows = NULL){}
181
182    function table_close(){}
183
184    function tablerow_open(){}
185
186    function tablerow_close(){}
187
188    function tableheader_open($colspan = 1, $align = NULL){}
189
190    function tableheader_close(){}
191
192    function tablecell_open($colspan = 1, $align = NULL){}
193
194    function tablecell_close(){}
195
196}
197
198
199//Setup VIM: ex: et ts=4 enc=utf-8 :
200