summaryrefslogtreecommitdiff
path: root/extensions/SyntaxHighlight_GeSHi/geshi/docs/api/geshi/core/_geshi.php.html
blob: 798f68f285ea3e241e520e6c89d993f99d53953f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs for page geshi.php</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="file-name"><img src="../../media/images/Page_logo.png" alt="File" style="vertical-align: middle">/geshi.php</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
							<a href="#sec-classes">Classes</a>
			|									<a href="#sec-constants">Constants</a>
			|									<a href="#sec-functions">Functions</a>
			</div>
	<div class="info-box-body">	
		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">GeSHi - Generic Syntax Highlighter</p>
<p class="description"><p>The GeSHi class for Generic Syntax Highlighting. Please refer to the  documentation at http://qbnz.com/highlighter/documentation.php for more  information about how to use this class.</p><p>For changes, release notes, TODOs etc, see the relevant files in the docs/  directory.</p><p>This file is part of GeSHi.</p><p>GeSHi is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 2 of the License, or   (at your option) any later version.</p><p>GeSHi is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   GNU General Public License for more details.</p><p>You should have received a copy of the GNU General Public License   along with GeSHi; if not, write to the Free Software   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Nigel McNie &lt;<a href="mailto:nigel@geshi.org">nigel@geshi.org</a>&gt;, Benny Baumann &lt;BenBE@omorphia.de&gt;</li>
				<li><span class="field">copyright:</span> (C) 2004 - 2007 Nigel McNie, (C) 2007 - 2008 Benny Baumann</li>
				<li><span class="field">filesource:</span> <a href="../../__filesource/fsource_geshi_core_geshi.php.html">Source Code for this file</a></li>
				<li><span class="field">license:</span> <a href="http://gnu.org/copyleft/gpl.html">GNU GPL</a></li>
			</ul>
		
			</div>
</div>
		
	<a name="sec-classes"></a>	
	<div class="info-box">
		<div class="info-box-title">Classes</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
			<span class="disabled">Classes</span>
			|										<a href="#sec-constants">Constants</a>
				|													<a href="#sec-functions">Functions</a>
					</div>
		<div class="info-box-body">	
			<table cellpadding="2" cellspacing="0" class="class-table">
				<tr>
					<th class="class-table-header">Class</th>
					<th class="class-table-header">Description</th>
				</tr>
								<tr>
					<td style="padding-right: 2em; vertical-align: top; white-space: nowrap">
						<img src="../../media/images/Class.png"
								 alt=" class"
								 title=" class"/>
						<a href="../../geshi/core/GeSHi.html">GeSHi</a>
					</td>
					<td>
											The GeSHi Class.
										</td>
				</tr>
							</table>
		</div>
	</div>

	
	<a name="sec-constants"></a>	
	<div class="info-box">
		<div class="info-box-title">Constants</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-classes">Classes</a>
				|									<span class="disabled">Constants</span>
			|										<a href="#sec-functions">Functions</a>
					</div>
		<div class="info-box-body">	
			<a name="defineGESHI_ACTIVE"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_ACTIVE</span> = 2
			(line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a107">107</a></span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Links in the source in the :active state</p>
	
		
</div>
<a name="defineGESHI_CAPS_LOWER"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_CAPS_LOWER</span> = 2
			(line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a99">99</a></span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Leave keywords found as the case that they are</p>
	
		
</div>
<a name="defineGESHI_CAPS_NO_CHANGE"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_CAPS_NO_CHANGE</span> = 0
			(line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a95">95</a></span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Lowercase keywords found</p>
	
		
</div>
<a name="defineGESHI_CAPS_UPPER"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_CAPS_UPPER</span> = 1
			(line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a97">97</a></span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Uppercase keywords found</p>
	
		
</div>
<a name="defineGESHI_END_IMPORTANT"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_END_IMPORTANT</span> = '&lt;END GeSHi&gt;'
			(line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a117">117</a></span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The ender for important parts of the source</p>
	
		
</div>
<a name="defineGESHI_FANCY_LINE_NUMBERS"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_FANCY_LINE_NUMBERS</span> = 2
			(line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a67">67</a></span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Use fancy line numbers when building the result</p>
	
		
</div>
<a name="defineGESHI_HEADER_DIV"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_HEADER_DIV</span> = 1
			(line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a73">73</a></span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Use a &quot;div&quot; to surround the source</p>
	
		
</div>
<a name="defineGESHI_HEADER_NONE"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_HEADER_NONE</span> = 0
			(line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a71">71</a></span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Use nothing to surround the source</p>
	
		
</div>
<a name="defineGESHI_HEADER_PRE"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_HEADER_PRE</span> = 2
			(line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a75">75</a></span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Use a &quot;pre&quot; to surround the source</p>
	
		
</div>
<a name="defineGESHI_HEADER_PRE_TABLE"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_HEADER_PRE_TABLE</span> = 4
			(line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a91">91</a></span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Use a &quot;table&quot; to surround the source:</p>
<p class="description"><p>&lt;table&gt;     &lt;thead&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;$header&lt;/td&gt;&lt;/tr&gt;&lt;/thead&gt;     &lt;tbody&gt;&lt;tr&gt;&lt;td&gt;<pre>$linenumbers</pre>&lt;/td&gt;&lt;td&gt;<pre>$code></pre>&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;     &lt;tfooter&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;$footer&lt;/td&gt;&lt;/tr&gt;&lt;/tfoot&gt;   &lt;/table&gt;</p><p>this is essentially only a workaround for Firefox, see sf#1651996 or take a look at  https://bugzilla.mozilla.org/show_bug.cgi?id=365805</p></p>
	<ul class="tags">
				<li><span class="field">note:</span> when linenumbers are disabled this is essentially the same as GESHI_HEADER_PRE</li>
			</ul>
	
		
</div>
<a name="defineGESHI_HEADER_PRE_VALID"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_HEADER_PRE_VALID</span> = 3
			(line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a77">77</a></span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Use a pre to wrap lines when line numbers are enabled or to wrap the whole code.</p>
	
		
</div>
<a name="defineGESHI_HOVER"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_HOVER</span> = 1
			(line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a105">105</a></span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Links in the source in the :hover state</p>
	
		
</div>
<a name="defineGESHI_LANG_ROOT"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_LANG_ROOT</span> = GESHI_ROOT.'geshi'.DIRECTORY_SEPARATOR
			(line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a53">53</a></span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The language file directory for GeSHi</p>
	
		
</div>
<a name="defineGESHI_LINK"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_LINK</span> = 0
			(line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a103">103</a></span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Links in the source in the :link state</p>
	
		
</div>
<a name="defineGESHI_NORMAL_LINE_NUMBERS"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_NORMAL_LINE_NUMBERS</span> = 1
			(line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a65">65</a></span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Use normal line numbers when building the result</p>
	
		
</div>
<a name="defineGESHI_NO_LINE_NUMBERS"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_NO_LINE_NUMBERS</span> = 0
			(line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a63">63</a></span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Use no line numbers when building the result</p>
	
		
</div>
<a name="defineGESHI_ROOT"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_ROOT</span> = dirname(__FILE__).DIRECTORY_SEPARATOR
			(line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a49">49</a></span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The root directory for GeSHi</p>
	
		
</div>
<a name="defineGESHI_SECURITY_PARANOID"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_SECURITY_PARANOID</span> = false
			(line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a58">58</a></span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Tells GeSHi to be paranoid about security settings</p>
	
		
</div>
<a name="defineGESHI_START_IMPORTANT"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_START_IMPORTANT</span> = '&lt;BEGIN GeSHi&gt;'
			(line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a115">115</a></span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The starter for important parts of the source</p>
	
		
</div>
<a name="defineGESHI_VERSION"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_VERSION</span> = '1.0.8.2',
			(line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a44">44</a></span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The version of this GeSHi file</p>
	
		
</div>
<a name="defineGESHI_VISITED"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_VISITED</span> = 3
			(line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a109">109</a></span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Links in the source in the :visited state</p>
	
		
</div>
		</div>
	</div>
	
	
	<a name="sec-functions"></a>	
	<div class="info-box">
		<div class="info-box-title">Functions</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-classes">Classes</a>
				|													<a href="#sec-constants">Constants</a>
				|									<span class="disabled">Functions</span>
		</div>
		<div class="info-box-body">	
			<a name="functiongeshi_highlight" id="functiongeshi_highlight"><!-- --></a>
<div class="evenrow">
	
	<div>
		<img src="../../media/images/Function.png" />
		<span class="method-title">geshi_highlight</span> (line <span class="line-number"><a href="../../__filesource/fsource_geshi_core_geshi.php.html#a4577">4577</a></span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Easy way to highlight stuff. Behaves just like highlight_string</p>
	<ul class="tags">
				<li><span class="field">return:</span> The code highlighted (if $return is true)</li>
				<li><span class="field">since:</span> 1.0.2</li>
			</ul>
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			geshi_highlight
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$string</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$language</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$path</span> = <span class="var-default">null</span>], [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$return</span> = <span class="var-default">false</span>])
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$string</span><span class="var-description">: The code to highlight</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$language</span><span class="var-description">: The language to highlight the code in</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$path</span><span class="var-description">: The path to the language files. You can leave this blank if you need                as from version 1.0.7 the path should be automatically detected</span>			</li>
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$return</span><span class="var-description">: Whether to return the result or to echo</span>			</li>
				</ul>
		
	
</div>
		</div>
	</div>
	
	<p class="notes" id="credit">
		Documentation generated on Thu, 25 Dec 2008 14:34:34 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
	</p>
	</div></body>
</html>