Subversion Repositories Applications.framework

Compare Revisions

Ignore whitespace Rev 463 → Rev 464

/trunk/doc/ApiGen/class-CacheFichier.html
New file
0,0 → 1,1812
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="ApiGen 2.8.0">
 
<title>Class CacheFichier | TBFramework - v0.4</title>
 
<script type="text/javascript" src="resources/combined.js?4205936287"></script>
<script type="text/javascript" src="elementlist.js?1964084359"></script>
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
 
</head>
 
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
 
 
<div id="groups">
<h3>Packages</h3>
<ul>
<li><a href="package-Framework.html">Framework</a>
</li>
<li class="active"><a href="package-None.html">None</a>
</li>
<li><a href="package-PHP.html">PHP</a>
</li>
<li><a href="package-Utilitaire.html">Utilitaire</a>
</li>
</ul>
</div>
 
<hr>
 
 
<div id="elements">
<h3>Classes</h3>
<ul>
<li class="active"><a href="class-CacheFichier.html">CacheFichier</a></li>
<li><a href="class-CacheSqlite.html">CacheSqlite</a></li>
<li><a href="class-MonScript.html">MonScript</a></li>
</ul>
 
 
 
 
 
</div>
</div>
</div>
 
<div id="splitter"></div>
 
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text">
<input type="submit" value="Search">
</form>
 
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="package-None.html" title="Summary of None"><span>Package</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
<li>
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
<li>
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
</li>
<li>
<a href="todo.html" title="Todo list"><span>Todo</span></a>
</li>
</ul>
<ul>
</ul>
</div>
 
<div id="content" class="class">
<h1>Class CacheFichier</h1>
 
 
 
 
 
 
 
 
 
 
 
<div class="info">
 
<b>Located at</b> <a href="source-class-CacheFichier.html#2-870" title="Go to source code">framework/CacheFichier.php</a><br>
</div>
 
 
 
<table class="summary" id="methods">
<caption>Methods summary</caption>
<tr data-order="__construct" id="___construct">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#___construct">#</a>
<code><a href="source-class-CacheFichier.html#73-101" title="Go to source code">__construct</a>( <span>array <var>$options</var> = <span class="php-keyword1">array</span>()</span>, <span><code><a href="class-Cache.html">Cache</a></code> <var>$cache</var></span> )</code>
 
<div class="description short">
<p>Constructor</p>
 
</div>
 
<div class="description detailed hidden">
<p>Constructor</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$options</var></dt>
<dd><code>array</code><br>$options associative array of options</dd>
<dt><var>$cache</var></dt>
<dd></dd>
</dl></div>
 
 
<h4>Throws</h4>
<div class="list">
<code>Zend_Cache_Exception</code><br>
</div>
 
 
 
</div>
</div></td>
</tr>
<tr data-order="setEmplacement" id="_setEmplacement">
 
<td class="attributes"><code>
public
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_setEmplacement">#</a>
<code><a href="source-class-CacheFichier.html#123-132" title="Go to source code">setEmplacement</a>( <span>mixed <var>$emplacement</var></span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="charger" id="_charger">
 
<td class="attributes"><code>
public
string|false
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_charger">#</a>
<code><a href="source-class-CacheFichier.html#134-159" title="Go to source code">charger</a>( <span>string <var>$id</var></span>, <span>boolean <var>$ne_pas_tester_validiter_du_cache</var> = <span class="php-keyword1">false</span></span> )</code>
 
<div class="description short">
<p>Test if a cache is available for the given id and (if yes) return it (false
else)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Test if a cache is available for the given id and (if yes) return it (false
else)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id cache id</dd>
<dt><var>$ne_pas_tester_validiter_du_cache</var></dt>
<dd><code>boolean</code><br>$doNotTestCacheValidity if set to true, the cache validity won't be tested</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string|false</code><br>cached datas<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="tester" id="_tester">
 
<td class="attributes"><code>
public
mixed
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_tester">#</a>
<code><a href="source-class-CacheFichier.html#161-170" title="Go to source code">tester</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Teste si un enregistrement en cache est disponible ou pas (pour l'id passé
en paramètre).</p>
 
</div>
 
<div class="description detailed hidden">
<p>Teste si un enregistrement en cache est disponible ou pas (pour l'id passé
en paramètre).</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id identifiant de cache.</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>mixed</code><br>false (le cache n'est pas disponible) ou timestamp (int) "de dernière
modification" de l'enregistrement en cache<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="sauver" id="_sauver">
 
<td class="attributes"><code>
public
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_sauver">#</a>
<code><a href="source-class-CacheFichier.html#172-221" title="Go to source code">sauver</a>( <span>string <var>$donnees</var></span>, <span>string <var>$id</var></span>, <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span>, <span>integer <var>$duree_vie_specifique</var> = <span class="php-keyword1">false</span></span> )</code>
 
<div class="description short">
<p>Save some string datas into a cache record</p>
 
</div>
 
<div class="description detailed hidden">
<p>Save some string datas into a cache record</p>
 
<p>Note : $data is always "string" (serialization is done by the core not by the
backend)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$donnees</var></dt>
<dd><code>string</code><br>$data Datas to cache</dd>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
<dt><var>$tags</var></dt>
<dd><code>array</code><br>$tags Array of strings, the cache record will be tagged by each string entry</dd>
<dt><var>$duree_vie_specifique</var></dt>
<dd><code>integer</code><br>$specificLifetime If != false, set a specific lifetime for this cache record
(null =&gt; infinite lifetime)</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true if no problem<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="supprimer" id="_supprimer">
 
<td class="attributes"><code>
public
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_supprimer">#</a>
<code><a href="source-class-CacheFichier.html#223-234" title="Go to source code">supprimer</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Remove a cache record</p>
 
</div>
 
<div class="description detailed hidden">
<p>Remove a cache record</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true if no problem<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="nettoyer" id="_nettoyer">
 
<td class="attributes"><code>
public
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_nettoyer">#</a>
<code><a href="source-class-CacheFichier.html#236-257" title="Go to source code">nettoyer</a>( <span>string <var>$mode</var> = <code><a href="class-Cache.html#NETTOYAGE_MODE_TOUS">Cache::<b>NETTOYAGE_MODE_TOUS</b></a></code></span>, <span>tags <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Clean some cache records</p>
 
</div>
 
<div class="description detailed hidden">
<p>Clean some cache records</p>
 
<p>Available modes are : 'all' (default) =&gt; remove all cache entries ($tags
is not used) 'old' =&gt; remove too old cache entries ($tags is not used)
'matchingTag' =&gt; remove cache entries matching all given tags ($tags can be
an array of strings or a single string) 'notMatchingTag' =&gt; remove cache
entries not matching one of the given tags ($tags can be an array of strings or
a single string) 'matchingAnyTag' =&gt; remove cache entries matching any given
tags ($tags can be an array of strings or a single string)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$mode</var></dt>
<dd><code>string</code><br>$mode clean mode</dd>
<dt><var>$tags</var></dt>
<dd><code>tags</code><br>array $tags array of tags</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true if no problem<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getIds" id="_getIds">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getIds">#</a>
<code><a href="source-class-CacheFichier.html#259-266" title="Go to source code">getIds</a>( )</code>
 
<div class="description short">
<p>Return an array of stored cache ids</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of stored cache ids</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of stored cache ids (string)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getTags" id="_getTags">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getTags">#</a>
<code><a href="source-class-CacheFichier.html#268-275" title="Go to source code">getTags</a>( )</code>
 
<div class="description short">
<p>Return an array of stored tags</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of stored tags</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of stored tags (string)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getIdsAvecLesTags" id="_getIdsAvecLesTags">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getIdsAvecLesTags">#</a>
<code><a href="source-class-CacheFichier.html#277-287" title="Go to source code">getIdsAvecLesTags</a>( <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Return an array of stored cache ids which match given tags</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of stored cache ids which match given tags</p>
 
<p>In case of multiple tags, a logical AND is made between tags</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$tags</var></dt>
<dd><code>array</code><br>$tags array of tags</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of matching cache ids (string)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getIdsSansLesTags" id="_getIdsSansLesTags">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getIdsSansLesTags">#</a>
<code><a href="source-class-CacheFichier.html#289-299" title="Go to source code">getIdsSansLesTags</a>( <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Return an array of stored cache ids which don't match given tags</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of stored cache ids which don't match given tags</p>
 
<p>In case of multiple tags, a logical OR is made between tags</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$tags</var></dt>
<dd><code>array</code><br>$tags array of tags</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of not matching cache ids (string)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getIdsAvecUnTag" id="_getIdsAvecUnTag">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getIdsAvecUnTag">#</a>
<code><a href="source-class-CacheFichier.html#301-311" title="Go to source code">getIdsAvecUnTag</a>( <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Return an array of stored cache ids which match any given tags</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of stored cache ids which match any given tags</p>
 
<p>In case of multiple tags, a logical AND is made between tags</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$tags</var></dt>
<dd><code>array</code><br>$tags array of tags</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of any matching cache ids (string)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getPourcentageRemplissage" id="_getPourcentageRemplissage">
 
<td class="attributes"><code>
public
integer
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getPourcentageRemplissage">#</a>
<code><a href="source-class-CacheFichier.html#313-330" title="Go to source code">getPourcentageRemplissage</a>( )</code>
 
<div class="description short">
<p>Return the filling percentage of the backend storage</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return the filling percentage of the backend storage</p>
 
 
 
 
<h4>Returns</h4>
<div class="list">
<code>integer</code><br>integer between 0 and 100<br>
</div>
 
<h4>Throws</h4>
<div class="list">
<code>Zend_Cache_Exception</code><br>
</div>
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getMetadonnees" id="_getMetadonnees">
 
<td class="attributes"><code>
public
array
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getMetadonnees">#</a>
<code><a href="source-class-CacheFichier.html#332-357" title="Go to source code">getMetadonnees</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Return an array of metadatas for the given cache id</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return an array of metadatas for the given cache id</p>
 
<p>The array must include these keys :</p>
 
<ul>
<li>expire : the expire timestamp</li>
 
<li>tags : a string array of tags</li>
 
<li>mtime : timestamp of last modification time</li>
</ul>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array</code><br>array of metadatas (false if the cache id is not found)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="ajouterSupplementDureeDeVie" id="_ajouterSupplementDureeDeVie">
 
<td class="attributes"><code>
public
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_ajouterSupplementDureeDeVie">#</a>
<code><a href="source-class-CacheFichier.html#359-382" title="Go to source code">ajouterSupplementDureeDeVie</a>( <span>string <var>$id</var></span>, <span>integer <var>$supplement_duree_de_vie</var></span> )</code>
 
<div class="description short">
<p>Give (if possible) an extra lifetime to the given cache id</p>
 
</div>
 
<div class="description detailed hidden">
<p>Give (if possible) an extra lifetime to the given cache id</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id cache id</dd>
<dt><var>$supplement_duree_de_vie</var></dt>
<dd><code>integer</code><br>$extraLifetime</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true if ok<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getMetadonneesFichier" id="_getMetadonneesFichier">
 
<td class="attributes"><code>
protected
array|false
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getMetadonneesFichier">#</a>
<code><a href="source-class-CacheFichier.html#384-400" title="Go to source code">getMetadonneesFichier</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Get a metadatas record</p>
 
</div>
 
<div class="description detailed hidden">
<p>Get a metadatas record</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array|false</code><br>Associative array of metadatas<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="setMetadonnees" id="_setMetadonnees">
 
<td class="attributes"><code>
protected
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_setMetadonnees">#</a>
<code><a href="source-class-CacheFichier.html#402-424" title="Go to source code">setMetadonnees</a>( <span>string <var>$id</var></span>, <span>array <var>$metadonnees</var></span>, <span>boolean <var>$sauvegarde</var> = <span class="php-keyword1">true</span></span> )</code>
 
<div class="description short">
<p>Set a metadatas record</p>
 
</div>
 
<div class="description detailed hidden">
<p>Set a metadatas record</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
<dt><var>$metadonnees</var></dt>
<dd><code>array</code><br>$metadatas Associative array of metadatas</dd>
<dt><var>$sauvegarde</var></dt>
<dd><code>boolean</code><br>$save optional pass false to disable saving to file</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>True if no problem<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="supprimerMetadonnees" id="_supprimerMetadonnees">
 
<td class="attributes"><code>
protected
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_supprimerMetadonnees">#</a>
<code><a href="source-class-CacheFichier.html#426-438" title="Go to source code">supprimerMetadonnees</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Drop a metadata record</p>
 
</div>
 
<div class="description detailed hidden">
<p>Drop a metadata record</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>True if no problem<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="nettoyerMetadonnees" id="_nettoyerMetadonnees">
 
<td class="attributes"><code>
protected
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_nettoyerMetadonnees">#</a>
<code><a href="source-class-CacheFichier.html#440-447" title="Go to source code">nettoyerMetadonnees</a>( )</code>
 
<div class="description short">
<p>Clear the metadatas array</p>
 
</div>
 
<div class="description detailed hidden">
<p>Clear the metadatas array</p>
 
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="chargerMetadonnees" id="_chargerMetadonnees">
 
<td class="attributes"><code>
protected
array|false
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_chargerMetadonnees">#</a>
<code><a href="source-class-CacheFichier.html#449-461" title="Go to source code">chargerMetadonnees</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Load metadatas from disk</p>
 
</div>
 
<div class="description detailed hidden">
<p>Load metadatas from disk</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>array|false</code><br>Metadatas associative array<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="sauverMetadonnees" id="_sauverMetadonnees">
 
<td class="attributes"><code>
protected
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_sauverMetadonnees">#</a>
<code><a href="source-class-CacheFichier.html#463-474" title="Go to source code">sauverMetadonnees</a>( <span>string <var>$id</var></span>, <span>array <var>$metadonnees</var></span> )</code>
 
<div class="description short">
<p>Save metadatas to disk</p>
 
</div>
 
<div class="description detailed hidden">
<p>Save metadatas to disk</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
<dt><var>$metadonnees</var></dt>
<dd><code>array</code><br>$metadatas Associative array</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>True if no problem<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getNomFichierMeta" id="_getNomFichierMeta">
 
<td class="attributes"><code>
protected
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getNomFichierMeta">#</a>
<code><a href="source-class-CacheFichier.html#476-486" title="Go to source code">getNomFichierMeta</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Make and return a file name (with path) for metadatas</p>
 
</div>
 
<div class="description detailed hidden">
<p>Make and return a file name (with path) for metadatas</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>Metadatas file name (with path)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="etreFichierMeta" id="_etreFichierMeta">
 
<td class="attributes"><code>
protected
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_etreFichierMeta">#</a>
<code><a href="source-class-CacheFichier.html#488-497" title="Go to source code">etreFichierMeta</a>( <span>string <var>$fichier_nom</var></span> )</code>
 
<div class="description short">
<p>Check if the given filename is a metadatas one</p>
 
</div>
 
<div class="description detailed hidden">
<p>Check if the given filename is a metadatas one</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$fichier_nom</var></dt>
<dd><code>string</code><br>$fileName File name</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>True if it's a metadatas one<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="supprimerFichier" id="_supprimerFichier">
 
<td class="attributes"><code>
protected
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_supprimerFichier">#</a>
<code><a href="source-class-CacheFichier.html#499-516" title="Go to source code">supprimerFichier</a>( <span>string <var>$fichier</var></span> )</code>
 
<div class="description short">
<p>Remove a file</p>
 
</div>
 
<div class="description detailed hidden">
<p>Remove a file</p>
 
<p>If we can't remove the file (because of locks or any problem), we will touch
the file to invalidate it</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$fichier</var></dt>
<dd><code>string</code><br>$file Complete file path</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>True if ok<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="nettoyerFichiers" id="_nettoyerFichiers">
 
<td class="attributes"><code>
protected
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_nettoyerFichiers">#</a>
<code><a href="source-class-CacheFichier.html#518-626" title="Go to source code">nettoyerFichiers</a>( <span>string <var>$dossier</var></span>, <span>string <var>$mode</var> = <code><a href="class-Cache.html#NETTOYAGE_MODE_TOUS">Cache::<b>NETTOYAGE_MODE_TOUS</b></a></code></span>, <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
<p>Clean some cache records (protected method used for recursive stuff)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Clean some cache records (protected method used for recursive stuff)</p>
 
<p>Available modes are : Zend_Cache::CLEANING_MODE_ALL (default) =&gt; remove
all cache entries ($tags is not used) Zend_Cache::CLEANING_MODE_OLD =&gt; remove
too old cache entries ($tags is not used) Zend_Cache::CLEANING_MODE_MATCHING_TAG
=&gt; remove cache entries matching all given tags ($tags can be an array of
strings or a single string) Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG =&gt;
remove cache entries not {matching one of the given tags} ($tags can be an array
of strings or a single string) Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG =&gt;
remove cache entries matching any given tags ($tags can be an array of strings
or a single string)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$dossier</var></dt>
<dd><code>string</code><br>$dir Directory to clean</dd>
<dt><var>$mode</var></dt>
<dd><code>string</code><br>$mode Clean mode</dd>
<dt><var>$tags</var></dt>
<dd><code>array</code><br>$tags Array of tags</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>True if no problem<br>
</div>
 
<h4>Throws</h4>
<div class="list">
<code>Zend_Cache_Exception</code><br>
</div>
 
 
 
</div>
</div></td>
</tr>
<tr data-order="analyserCache" id="_analyserCache">
 
<td class="attributes"><code>
protected
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_analyserCache">#</a>
<code><a href="source-class-CacheFichier.html#628-709" title="Go to source code">analyserCache</a>( <span>mixed <var>$dossier</var></span>, <span>mixed <var>$mode</var></span>, <span>mixed <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
 
<div class="description short">
</div>
 
<div class="description detailed hidden">
 
 
 
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="genererCleSecu" id="_genererCleSecu">
 
<td class="attributes"><code>
protected
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_genererCleSecu">#</a>
<code><a href="source-class-CacheFichier.html#711-732" title="Go to source code">genererCleSecu</a>( <span>string <var>$donnees</var></span>, <span>string <var>$type_de_controle</var></span> )</code>
 
<div class="description short">
<p>Make a control key with the string containing datas</p>
 
</div>
 
<div class="description detailed hidden">
<p>Make a control key with the string containing datas</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$donnees</var></dt>
<dd><code>string</code><br>$data Data</dd>
<dt><var>$type_de_controle</var></dt>
<dd><code>string</code><br>$controlType Type of control 'md5', 'crc32' or 'strlen'</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>Control key<br>
</div>
 
<h4>Throws</h4>
<div class="list">
<code>Zend_Cache_Exception</code><br>
</div>
 
 
 
</div>
</div></td>
</tr>
<tr data-order="transformaterIdEnNomFichier" id="_transformaterIdEnNomFichier">
 
<td class="attributes"><code>
protected
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_transformaterIdEnNomFichier">#</a>
<code><a href="source-class-CacheFichier.html#734-744" title="Go to source code">transformaterIdEnNomFichier</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Transform a cache id into a file name and return it</p>
 
</div>
 
<div class="description detailed hidden">
<p>Transform a cache id into a file name and return it</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>File name<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getFichierNom" id="_getFichierNom">
 
<td class="attributes"><code>
protected
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getFichierNom">#</a>
<code><a href="source-class-CacheFichier.html#746-756" title="Go to source code">getFichierNom</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Make and return a file name (with path)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Make and return a file name (with path)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>File name (with path)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getChemin" id="_getChemin">
 
<td class="attributes"><code>
protected
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getChemin">#</a>
<code><a href="source-class-CacheFichier.html#758-777" title="Go to source code">getChemin</a>( <span>string <var>$id</var></span>, <span>boolean <var>$decoupage</var> = <span class="php-keyword1">false</span></span> )</code>
 
<div class="description short">
<p>Return the complete directory path of a filename (including
hashedDirectoryStructure)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return the complete directory path of a filename (including
hashedDirectoryStructure)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
<dt><var>$decoupage</var></dt>
<dd><code>boolean</code><br>$decoupage if true, returns array of directory parts instead of single string</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>Complete directory path<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="lancerMkdirEtChmodRecursif" id="_lancerMkdirEtChmodRecursif">
 
<td class="attributes"><code>
protected
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_lancerMkdirEtChmodRecursif">#</a>
<code><a href="source-class-CacheFichier.html#779-797" title="Go to source code">lancerMkdirEtChmodRecursif</a>( <span>string <var>$id</var></span> )</code>
 
<div class="description short">
<p>Make the directory strucuture for the given id</p>
 
</div>
 
<div class="description detailed hidden">
<p>Make the directory strucuture for the given id</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id cache id</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="testerExistenceCache" id="_testerExistenceCache">
 
<td class="attributes"><code>
protected
boolean|mixed
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_testerExistenceCache">#</a>
<code><a href="source-class-CacheFichier.html#799-814" title="Go to source code">testerExistenceCache</a>( <span>string <var>$id</var></span>, <span>boolean <var>$ne_pas_tester_validiter_du_cache</var></span> )</code>
 
<div class="description short">
<p>Test if the given cache id is available (and still valid as a cache
record)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Test if the given cache id is available (and still valid as a cache
record)</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$id</var></dt>
<dd><code>string</code><br>$id Cache id</dd>
<dt><var>$ne_pas_tester_validiter_du_cache</var></dt>
<dd><code>boolean</code><br>$doNotTestCacheValidity If set to true, the cache validity won't be tested</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean|mixed</code><br>false (a cache is not available) or "last modified" timestamp (int) of the
available cache record<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="getContenuFichier" id="_getContenuFichier">
 
<td class="attributes"><code>
protected
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_getContenuFichier">#</a>
<code><a href="source-class-CacheFichier.html#816-834" title="Go to source code">getContenuFichier</a>( <span>string <var>$fichier</var></span> )</code>
 
<div class="description short">
<p>Return the file content of the given file</p>
 
</div>
 
<div class="description detailed hidden">
<p>Return the file content of the given file</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$fichier</var></dt>
<dd><code>string</code><br>$file File complete path</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>File content (or false if problem)<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="setContenuFichier" id="_setContenuFichier">
 
<td class="attributes"><code>
protected
boolean
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_setContenuFichier">#</a>
<code><a href="source-class-CacheFichier.html#836-858" title="Go to source code">setContenuFichier</a>( <span>string <var>$fichier</var></span>, <span>string <var>$chaine</var></span> )</code>
 
<div class="description short">
<p>Put the given string into the given file</p>
 
</div>
 
<div class="description detailed hidden">
<p>Put the given string into the given file</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$fichier</var></dt>
<dd><code>string</code><br>$file File complete path</dd>
<dt><var>$chaine</var></dt>
<dd><code>string</code><br>$string String to put in file</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>boolean</code><br>true if no problem<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
<tr data-order="transformerNomFichierEnId" id="_transformerNomFichierEnId">
 
<td class="attributes"><code>
protected
string
</code>
</td>
 
<td class="name"><div>
<a class="anchor" href="#_transformerNomFichierEnId">#</a>
<code><a href="source-class-CacheFichier.html#860-869" title="Go to source code">transformerNomFichierEnId</a>( <span>string <var>$nom_de_fichier</var></span> )</code>
 
<div class="description short">
<p>Transform a file name into cache id and return it</p>
 
</div>
 
<div class="description detailed hidden">
<p>Transform a file name into cache id and return it</p>
 
 
 
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$nom_de_fichier</var></dt>
<dd><code>string</code><br>$fileName File name</dd>
</dl></div>
 
<h4>Returns</h4>
<div class="list">
<code>string</code><br>Cache id<br>
</div>
 
 
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
 
 
 
 
 
 
<table class="summary" id="properties">
<caption>Properties summary</caption>
<tr data-order="options" id="$options">
<td class="attributes"><code>
protected
array
</code></td>
 
<td class="name">
<a href="source-class-CacheFichier.html#3-62" title="Go to source code"><var>$options</var></a>
</td>
<td class="value"><code><span class="php-keyword1">array</span>(
<span class="php-quote">'stockage_chemin'</span> =&gt; <span class="php-keyword1">null</span>,
<span class="php-quote">'fichier_verrou'</span> =&gt; <span class="php-keyword1">true</span>,
<span class="php-quote">'controle_lecture'</span> =&gt; <span class="php-keyword1">true</span>,
<span class="php-quote">'controle_lecture_type'</span> =&gt; <span class="php-quote">'crc32'</span>,
<span class="php-quote">'dossier_niveau'</span> =&gt; <span class="php-num">0</span>,
<span class="php-quote">'dossier_umask'</span> =&gt; <span class="php-num">0700</span>,
<span class="php-quote">'fichier_prefixe'</span> =&gt; <span class="php-quote">'tbf'</span>,
<span class="php-quote">'fichier_umask'</span> =&gt; <span class="php-num">0600</span>,
<span class="php-quote">'metadonnees_max_taille'</span> =&gt; <span class="php-num">100</span>
)</code></td>
<td class="description"><div>
<a href="#$options" class="anchor">#</a>
 
<div class="description short">
<p>Options disponibles</p>
 
</div>
 
<div class="description detailed hidden">
<p>Options disponibles</p>
 
<h2>&gt; (string) stockage_chemin :</h2>
 
<p>Chemin vers le dossier devant contenir l'arborescence du cache.</p>
 
<h1>&gt; (boolean) fichier_verrou :</h1>
 
<ul>
<li>Active / Désactive le verrouillage des fichiers</li>
 
<li>Peut éviter la corruption du cache dans de mauvaises circonstances, mais
cela ne fonctionne pas sur des serveur</li>
</ul>
 
<p>multithread et sur les systèmes de fichiers NFS par exemple.</p>
 
<h1>&gt; (boolean) controle_lecture :</h1>
 
<ul>
<li>Activer / désactiver le contrôle de lecture</li>
 
<li>S'il est activé, une clé de contrôle est ajoutée dans le fichier de
cache et cette clé est comparée avec celle calculée</li>
</ul>
 
<p>après la lecture.</p>
 
<h1>&gt; (string) controle_lecture_type :</h1>
 
<p>Type de contrôle de lecture (seulement si le contrôle de lecture est
activé). Les valeurs disponibles sont:</p>
 
<ul>
<li>«md5» pour un contrôle md5 (le meilleur mais le plus lent)</li>
 
<li>«crc32» pour un contrôle de hachage crc32 (un peu moins sécurisé, mais
plus rapide, un meilleur choix)</li>
 
<li>«adler32» pour un contrôle de hachage adler32 (excellent choix aussi,
plus rapide que crc32)</li>
 
<li>«strlen» pour un test de longueur uniquement (le plus rapide)</li>
</ul>
 
<h1>&gt; (int) dossier_niveau :</h1>
 
<ul>
<li>Permet de réglez le nombre de niveau de sous-dossier que contiendra
l'arborescence des dossiers du cache.</li>
</ul>
 
<p>0 signifie "pas de sous-dossier pour le cache", 1 signifie "un niveau de
sous-dossier", 2 signifie "deux niveaux" ... Cette option peut accélérer le
cache seulement lorsque vous avez plusieurs centaines de fichiers de cache.
Seuls des tests spécifiques peuvent vous aider à choisir la meilleure valeur
possible pour vous. 1 ou 2 peut être est un bon début.</p>
 
<h1>&gt; (int) dossier_umask :</h1>
 
<ul>
<li>Umask pour les sous-dossiers de l'arborescence du cache.</li>
</ul>
 
<h1>&gt; (string) fichier_prefixe :</h1>
 
<ul>
<li>préfixe pour les fichiers du cache</li>
 
<li>ATTENTION : faite vraiment attention avec cette option, car une valeur trop
générique dans le dossier cache du système</li>
</ul>
 
<p>(comme /tmp) peut provoquer des catastrophes lors du nettoyage du cache.</p>
 
<h1>&gt; (int) fichier_umask :</h1>
 
<ul>
<li>Umask pour les fichiers de cache</li>
</ul>
 
<h1>&gt; (int) metadonnees_max_taille :</h1>
 
<ul>
<li>taille maximum pour le tableau de métadonnées du cache (ne changer pas
cette valeur sauf si vous savez ce que vous faite)</li>
</ul>
 
 
</div>
</div></td>
</tr>
<tr data-order="metadonnees" id="$metadonnees">
<td class="attributes"><code>
protected
array
</code></td>
 
<td class="name">
<a href="source-class-CacheFichier.html#64-69" title="Go to source code"><var>$metadonnees</var></a>
</td>
<td class="value"><code><span class="php-keyword1">array</span>()</code></td>
<td class="description"><div>
<a href="#$metadonnees" class="anchor">#</a>
 
<div class="description short">
<p>Array of metadatas (each item is an associative array)</p>
 
</div>
 
<div class="description detailed hidden">
<p>Array of metadatas (each item is an associative array)</p>
 
 
</div>
</div></td>
</tr>
</table>
 
 
 
 
 
 
</div>
 
<div id="footer">
TBFramework - v0.4 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
</div>
</div>
</div>
</body>
</html>