Location: PHPKode > projects > PHPLayouts > PHPLayouts/docs/php-layouts/Template.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 Class Template</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="class-name">Class Template</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-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
											<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
						
			</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
		<p class="notes">
			Located in <a class="field" href="_Template.php.html">/Template.php</a> (line <span class="field">19</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>


	<a name="sec-const-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constant Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<div class="const-summary">
								<div class="const-title">
					<img src="../media/images/Constant.png" alt=" " />
					<a href="#EOL" title="details" class="const-name">EOL</a> = 					<span class="var-type">  &quot;\r\n&quot;</span>

				</div>
								<div class="const-title">
					<img src="../media/images/Constant.png" alt=" " />
					<a href="#VERSION" title="details" class="const-name">VERSION</a> = 					<span class="var-type">  '0.9.1-beta'</span>

				</div>
							</div>
		</div>
	</div>


	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
									<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																																				<div class="method-definition">
					static 						<span class="method-result">void</span>
										<a href="#_cleanDir" title="details" class="method-name">_cleanDir</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$dir</span>)
									</div>
																																																								
												<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#addTemplateDir" title="details" class="method-name">addTemplateDir</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$tpl_dir</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#clearVars" title="details" class="method-name">clearVars</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#debug" title="details" class="method-name">debug</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#display" title="details" class="method-name">display</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getTemplateDir" title="details" class="method-name">getTemplateDir</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getVars" title="details" class="method-name">getVars</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#render" title="details" class="method-name">render</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$dir</span> = <span class="var-default">null</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#setTemplateDir" title="details" class="method-name">setTemplateDir</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$tpl_dir</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setVar" title="details" class="method-name">setVar</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#templateExists" title="details" class="method-name">templateExists</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">Template</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
										()
									</div>
																								<div class="method-definition">
											<span class="method-result">string|bool</span>
										<a href="#_searchTemplateDir" title="details" class="method-name">_searchTemplateDir</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$template_name</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#__call" title="details" class="method-name">__call</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$method</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$arguments</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#__get" title="details" class="method-name">__get</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#__isset" title="details" class="method-name">__isset</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">false</span>
										<a href="#__set" title="details" class="method-name">__set</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$val</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#__unset" title="details" class="method-name">__unset</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>)
									</div>
								</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
										<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="method_cleanDir" id="_cleanDir"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static method _cleanDir</span> (line <span class="line-number">195</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">void</span>
		<span class="method-name">
			_cleanDir
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$dir</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$dir</span>			</li>
				</ul>
		
			
	</div>

<a name="methodaddTemplateDir" id="addTemplateDir"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">addTemplateDir</span> (line <span class="line-number">207</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Add a template directory</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			addTemplateDir
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$tpl_dir</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$tpl_dir</span><span class="var-description">: Folder containing the template files</span>			</li>
				</ul>
		
			
	</div>
<a name="methodclearVars" id="clearVars"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">clearVars</span> (line <span class="line-number">265</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Clear all templates variables</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			clearVars
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methoddebug" id="debug"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">debug</span> (line <span class="line-number">444</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Show a debug template</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			debug
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methoddisplay" id="display"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">display</span> (line <span class="line-number">274</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Displays a template</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			display
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$file</span><span class="var-description">: The template file</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetTemplateDir" id="getTemplateDir"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getTemplateDir</span> (line <span class="line-number">223</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns an array containing the template directory</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getTemplateDir
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetVars" id="getVars"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getVars</span> (line <span class="line-number">257</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get all assigned variables</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getVars
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodrender" id="render"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">render</span> (line <span class="line-number">385</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Render a template file.</p>
	<ul class="tags">
				<li><span class="field">todo:</span> Default extension management</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			render
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$dir</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$file</span><span class="var-description">: Template file to render</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$dir</span><span class="var-description">: Directory to force</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetTemplateDir" id="setTemplateDir"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setTemplateDir</span> (line <span class="line-number">183</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set a default template directory</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			setTemplateDir
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$tpl_dir</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$tpl_dir</span><span class="var-description">: Folder containing the template files</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetVar" id="setVar"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setVar</span> (line <span class="line-number">248</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set a template variable</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setVar
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$value</span>			</li>
				</ul>
		
			
	</div>
<a name="methodtemplateExists" id="templateExists"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">templateExists</span> (line <span class="line-number">233</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Checks if the specified template file exists or not</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			templateExists
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$file</span>			</li>
				</ul>
		
			
	</div>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">61</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Template</span>
		<span class="method-name">
			__construct
		</span>
				()
			</div>
	
		
			
	</div>
<a name="method_searchTemplateDir" id="_searchTemplateDir"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">_searchTemplateDir</span> (line <span class="line-number">366</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function look for a template directory when a template name is provided</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string|bool</span>
		<span class="method-name">
			_searchTemplateDir
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$template_name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$template_name</span><span class="var-description">: Template name</span>			</li>
				</ul>
		
			
	</div>
<a name="method__call" id="__call"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">__call</span> (line <span class="line-number">172</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Allow to use cache() function to access to  the _cache var class.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			__call
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$method</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$arguments</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$method</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$arguments</span>			</li>
				</ul>
		
			
	</div>
<a name="method__get" id="__get"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">__get</span> (line <span class="line-number">94</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Prevent E_NOTICE for nonexistent values</p>
<p class="description"><p>If strictVars() is on, raises a notice.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			__get
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$key</span>			</li>
				</ul>
		
			
	</div>
<a name="method__isset" id="__isset"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">__isset</span> (line <span class="line-number">133</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Allows testing with empty() and isset() to work inside  templates.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			__isset
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$key</span>			</li>
				</ul>
		
			
	</div>
<a name="method__set" id="__set"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">__set</span> (line <span class="line-number">120</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Directly assigns a variable to the view script.</p>
<p class="description"><p>Checks first to ensure that the caller is not attempting to set a  protected or private member (by checking for a prefixed underscore); if  not, the public member is set; otherwise, an exception is raised.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">false</span>
		<span class="method-name">
			__set
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$val</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$key</span><span class="var-description">: The variable name.</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$val</span><span class="var-description">: The variable value.</span>			</li>
				</ul>
		
			
	</div>
<a name="method__unset" id="__unset"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">__unset</span> (line <span class="line-number">149</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Allows unset() on object properties to work</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			__unset
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$key</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$key</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>

	<a name="sec-consts"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constants</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Constants</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="constEOL" id="EOL"><!-- --></A>
<div class="oddrow">

	<div class="const-header">
		<img src="../media/images/Variable.png" />
		<span class="const-title">
			<span class="const-name">EOL</span>
			 = <span class="const-default">  &quot;\r\n&quot;</span>
			(line <span class="line-number">22</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
	
</div>
<a name="constVERSION" id="VERSION"><!-- --></A>
<div class="evenrow">

	<div class="const-header">
		<img src="../media/images/Variable.png" />
		<span class="const-title">
			<span class="const-name">VERSION</span>
			 = <span class="const-default">  '0.9.1-beta'</span>
			(line <span class="line-number">21</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
	
</div>
						
		</div>
	</div>

	<p class="notes" id="credit">
		Documentation generated on Fri, 02 Apr 2010 21:55:16 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>
Return current item: PHPLayouts