Location: PHPKode > projects > PHPLayouts > PHPLayouts/docs/php-layouts/Cache.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 Cache</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 Cache</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>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Cache Handler</p>
	<ul class="tags">
				<li><span class="field">author:</span> rodix53 &lt;<a href="mailto:hide@address.com">hide@address.com</a>&gt;</li>
				<li><span class="field">version:</span> 0.9.1-beta</li>
				<li><span class="field">license:</span> <a href="http://creativecommons.org/licenses/by-nc/2.0/fr/">Creative Commons BY-NC 2.0</a></li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_Cache.php.html">/Cache.php</a> (line <span class="field">12</span>)
		</p>
		
				
		<pre></pre>
	
			</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> |
												<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">
											<span class="method-result">Cache</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$tpl_dir</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#activate" title="details" class="method-name">activate</a>
											([<span class="var-type">int</span>&nbsp;<span class="var-name">$lifetime</span> = <span class="var-default">3600</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#checkCache" title="details" class="method-name">checkCache</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$filename</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#clearAllCache" title="details" class="method-name">clearAllCache</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#createCache" title="details" class="method-name">createCache</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$filename</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$content</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#deleteCache" title="details" class="method-name">deleteCache</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$filename</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#desactivate" title="details" class="method-name">desactivate</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getCacheDir" title="details" class="method-name">getCacheDir</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#isActivated" title="details" class="method-name">isActivated</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#setCacheDir" title="details" class="method-name">setCacheDir</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$cache_dir</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-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<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">23</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">Cache</span>
		<span class="method-name">
			__construct
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$tpl_dir</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$tpl_dir</span>			</li>
				</ul>
		
			
	</div>
<a name="methodactivate" id="activate"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">activate</span> (line <span class="line-number">41</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Enable the cache handler</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">
			activate
		</span>
					([<span class="var-type">int</span>&nbsp;<span class="var-name">$lifetime</span> = <span class="var-default">3600</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$lifetime</span><span class="var-description">: The life time of a cache file</span>			</li>
				</ul>
		
			
	</div>
<a name="methodcheckCache" id="checkCache"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">checkCache</span> (line <span class="line-number">85</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Check if the cache file need to be re-compiled 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">
			checkCache
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$filename</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$filename</span><span class="var-description">: Name of the cache file</span>			</li>
				</ul>
		
			
	</div>
<a name="methodclearAllCache" id="clearAllCache"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">clearAllCache</span> (line <span class="line-number">131</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Clear all the cache</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">
			clearAllCache
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodcreateCache" id="createCache"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">createCache</span> (line <span class="line-number">109</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Create a new cache file</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">
			createCache
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$filename</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$content</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$filename</span><span class="var-description">: Name of the cache file</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$content</span><span class="var-description">: Content of the cache file</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddeleteCache" id="deleteCache"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">deleteCache</span> (line <span class="line-number">122</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Delete a specified cache file</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">
			deleteCache
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$filename</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$filename</span><span class="var-description">: Name of the cache file</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddesactivate" id="desactivate"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">desactivate</span> (line <span class="line-number">50</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Disable the cache handler</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">
			desactivate
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetCacheDir" id="getCacheDir"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getCacheDir</span> (line <span class="line-number">75</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get cache directory</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getCacheDir
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodisActivated" id="isActivated"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">isActivated</span> (line <span class="line-number">32</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return if the cache handler is activated 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">
			isActivated
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodsetCacheDir" id="setCacheDir"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setCacheDir</span> (line <span class="line-number">60</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set cache 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">
			setCacheDir
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$cache_dir</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$cache_dir</span><span class="var-description">: Folder of cache scores</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


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