Location: PHPKode > projects > PASTE > classes/geshi/docs/api/geshi/core/_geshi.php.html
<?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:hide@address.com">hide@address.com</a>&gt;, Benny Baumann &lt;hide@address.com&gt;</li>
				<li><span class="field">copyright:</span> (C) 2004 - 2007 Nigel McNie, (C) 2007 - 2008 Benny Baumann</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="evenrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_ACTIVE</span> = 2
			(line <span class="line-number">86</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="oddrow">
	
	<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">78</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="evenrow">
	
	<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">74</span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Lowercase keywords found</p>
	
		
</div>
<a name="defineGESHI_CAPS_UPPER"><!-- --></a>
<div class="oddrow">
	
	<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">76</span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Uppercase keywords found</p>
	
		
</div>
<a name="defineGESHI_END_IMPORTANT"><!-- --></a>
<div class="evenrow">
	
	<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">96</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="oddrow">
	
	<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">62</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="evenrow">
	
	<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">68</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="oddrow">
	
	<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">66</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="evenrow">
	
	<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">70</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_HOVER"><!-- --></a>
<div class="oddrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_HOVER</span> = 1
			(line <span class="line-number">84</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="evenrow">
	
	<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">53</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="oddrow">
	
	<div>
		<img src="../../media/images/Constant.png" />
		<span class="const-title">
			<span class="const-name">GESHI_LINK</span> = 0
			(line <span class="line-number">82</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="evenrow">
	
	<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">60</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="oddrow">
	
	<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">58</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="evenrow">
	
	<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">49</span>)
		</span>
	</div>
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The root directory for GeSHi</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">94</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.7.21'
			(line <span class="line-number">44</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">88</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">3084</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 Sun, 23 Mar 2008 13:36:21 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.1</a>
	</p>
	</div></body>
</html>
Return current item: PASTE