Rev 300 | Blame | Last modification | View Log | RSS feed
<!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>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'/>
<link rel="stylesheet" href="../media/stylesheet.css" />
<script src="../media/lib/classTree.js"></script>
<script language="javascript" type="text/javascript">
var imgPlus = new Image();
var imgMinus = new Image();
imgPlus.src = "../media/images/plus.png";
imgMinus.src = "../media/images/minus.png";
function showNode(Node){
switch(navigator.family){
case 'nn4':
// Nav 4.x code fork...
var oTable = document.layers["span" + Node];
var oImg = document.layers["img" + Node];
break;
case 'ie4':
// IE 4/5 code fork...
var oTable = document.all["span" + Node];
var oImg = document.all["img" + Node];
break;
case 'gecko':
// Standards Compliant code fork...
var oTable = document.getElementById("span" + Node);
var oImg = document.getElementById("img" + Node);
break;
}
oImg.src = imgMinus.src;
oTable.style.display = "block";
}
function hideNode(Node){
switch(navigator.family){
case 'nn4':
// Nav 4.x code fork...
var oTable = document.layers["span" + Node];
var oImg = document.layers["img" + Node];
break;
case 'ie4':
// IE 4/5 code fork...
var oTable = document.all["span" + Node];
var oImg = document.all["img" + Node];
break;
case 'gecko':
// Standards Compliant code fork...
var oTable = document.getElementById("span" + Node);
var oImg = document.getElementById("img" + Node);
break;
}
oImg.src = imgPlus.src;
oTable.style.display = "none";
}
function nodeIsVisible(Node){
switch(navigator.family){
case 'nn4':
// Nav 4.x code fork...
var oTable = document.layers["span" + Node];
break;
case 'ie4':
// IE 4/5 code fork...
var oTable = document.all["span" + Node];
break;
case 'gecko':
// Standards Compliant code fork...
var oTable = document.getElementById("span" + Node);
break;
}
return (oTable && oTable.style.display == "block");
}
function toggleNodeVisibility(Node){
if (nodeIsVisible(Node)){
hideNode(Node);
}else{
showNode(Node);
}
}
</script>
</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-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
| <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="short-description">Classe Cache permettant de mettre en cache des données.</p>
<p class="description"><p>Basée sur les principes de Zend_Cache (Copyright (c) 2005-2010, Zend Technologies USA, Inc. All rights reserved.)</p></p>
<ul class="tags">
<li><span class="field">author:</span> Jean-Pascal MILCENT <<a href="mailto:jpm@tela-botanica.org">jpm@tela-botanica.org</a>></li>
<li><span class="field">version:</span> $Id: Cache.php 299 2011-01-18 14:03:46Z jpm $</li>
<li><span class="field">copyright:</span> Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)</li>
<li><span class="field">link:</span> /doc/framework/</li>
<li><span class="field">license:</span> <a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL</a></li>
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL</a></li>
<li><span class="field">license:</span> <a href="http://framework.zend.com/license/new-bsd">Licence New BSD</a></li>
</ul>
<p class="notes">
Located in <a class="field" href="_Cache.php.html">/Cache.php</a> (line <span class="field"><a href="../__filesource/fsource_Framework__Cache.php.html#a17">17</a></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-var-summary">Vars</a> (<a href="#sec-vars">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="#NETTOYAGE_MODE_AVEC_LES_TAGS" title="details" class="const-name">NETTOYAGE_MODE_AVEC_LES_TAGS</a> = <span class="var-type"> "avecLesTags"</span>
</div>
<div class="const-title">
<img src="../media/images/Constant.png" alt=" " />
<a href="#NETTOYAGE_MODE_AVEC_UN_TAG" title="details" class="const-name">NETTOYAGE_MODE_AVEC_UN_TAG</a> = <span class="var-type"> "avecUnTag"</span>
</div>
<div class="const-title">
<img src="../media/images/Constant.png" alt=" " />
<a href="#NETTOYAGE_MODE_EXPIRATION" title="details" class="const-name">NETTOYAGE_MODE_EXPIRATION</a> = <span class="var-type"> "expiration"</span>
</div>
<div class="const-title">
<img src="../media/images/Constant.png" alt=" " />
<a href="#NETTOYAGE_MODE_SANS_LES_TAGS" title="details" class="const-name">NETTOYAGE_MODE_SANS_LES_TAGS</a> = <span class="var-type"> "sansLesTags"</span>
</div>
<div class="const-title">
<img src="../media/images/Constant.png" alt=" " />
<a href="#NETTOYAGE_MODE_TOUS" title="details" class="const-name">NETTOYAGE_MODE_TOUS</a> = <span class="var-type"> "tous"</span>
</div>
<div class="const-title">
<img src="../media/images/Constant.png" alt=" " />
<a href="#STOCKAGE_MODE_FICHIER" title="details" class="const-name">STOCKAGE_MODE_FICHIER</a> = <span class="var-type"> "Fichier"</span>
</div>
<div class="const-title">
<img src="../media/images/Constant.png" alt=" " />
<a href="#STOCKAGE_MODE_SIMPLE" title="details" class="const-name">STOCKAGE_MODE_SIMPLE</a> = <span class="var-type"> "FichierSimple"</span>
</div>
<div class="const-title">
<img src="../media/images/Constant.png" alt=" " />
<a href="#STOCKAGE_MODE_SQLITE" title="details" class="const-name">STOCKAGE_MODE_SQLITE</a> = <span class="var-type"> "Sqlite"</span>
</div>
</div>
</div>
</div>
<a name="sec-var-summary"></a>
<div class="info-box">
<div class="info-box-title">Variable Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
<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">
<div class="var-summary">
<div class="var-title">
<span class="var-type">array</span>
<a href="#$options" title="details" class="var-name">$options</a>
</div>
<div class="var-title">
<span class="var-type">mixed</span>
<a href="#$stockage" title="details" class="var-name">$stockage</a>
</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>)
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">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="#fabriquer" title="details" class="method-name">fabriquer</a>
(<span class="var-type"></span> <span class="var-name">$mode</span>, [<span class="var-type"></span> <span class="var-name">$options</span> = <span class="var-default">array()</span>])
</div>
<div class="method-definition">
static <span class="method-result">void</span>
<a href="#validerIdOuTag" title="details" class="method-name">validerIdOuTag</a>
(<span class="var-type">string</span> <span class="var-name">$chaine</span>)
</div>
<div class="method-definition">
static <span class="method-result">void</span>
<a href="#validerTableauDeTags" title="details" class="method-name">validerTableauDeTags</a>
(<span class="var-type">array</span> <span class="var-name">$tags</span>)
</div>
<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> <span class="var-name">$options</span> = <span class="var-default">array()</span>], [<span class="var-type"></span> <span class="var-name">$options_stockage</span> = <span class="var-default">array()</span>])
</div>
<div class="method-definition">
<span class="method-result">boolean</span>
<a href="#ajouterSupplementDureeDeVie" title="details" class="method-name">ajouterSupplementDureeDeVie</a>
(<span class="var-type">string</span> <span class="var-name">$id</span>, <span class="var-type"></span> <span class="var-name">$supplement_duree_de_vie</span>, <span class="var-type">int</span> <span class="var-name">$extraLifetime</span>)
</div>
<div class="method-definition">
<span class="method-result">mixed|false</span>
<a href="#charger" title="details" class="method-name">charger</a>
(<span class="var-type">string</span> <span class="var-name">$id</span>, [<span class="var-type">boolean</span> <span class="var-name">$ne_pas_tester_validiter_du_cache</span> = <span class="var-default">false</span>])
</div>
<div class="method-definition">
<span class="method-result">array</span>
<a href="#getIds" title="details" class="method-name">getIds</a>
()
</div>
<div class="method-definition">
<span class="method-result">array</span>
<a href="#getIdsAvecLesTags" title="details" class="method-name">getIdsAvecLesTags</a>
([<span class="var-type">array</span> <span class="var-name">$tags</span> = <span class="var-default">array()</span>])
</div>
<div class="method-definition">
<span class="method-result">array</span>
<a href="#getIdsAvecUnTag" title="details" class="method-name">getIdsAvecUnTag</a>
([<span class="var-type">array</span> <span class="var-name">$tags</span> = <span class="var-default">array()</span>])
</div>
<div class="method-definition">
<span class="method-result">array</span>
<a href="#getIdsSansLesTags" title="details" class="method-name">getIdsSansLesTags</a>
([<span class="var-type">array</span> <span class="var-name">$tags</span> = <span class="var-default">array()</span>])
</div>
<div class="method-definition">
<span class="method-result">array</span>
<a href="#getMetadonnees" title="details" class="method-name">getMetadonnees</a>
(<span class="var-type">string</span> <span class="var-name">$id</span>)
</div>
<div class="method-definition">
<span class="method-result">int</span>
<a href="#getPourcentageRemplissage" title="details" class="method-name">getPourcentageRemplissage</a>
()
</div>
<div class="method-definition">
<span class="method-result">array</span>
<a href="#getTags" title="details" class="method-name">getTags</a>
()
</div>
<div class="method-definition">
<span class="method-result">int</span>
<a href="#getTimestampExpiration" title="details" class="method-name">getTimestampExpiration</a>
(<span class="var-type"></span> <span class="var-name">$duree_de_vie</span>)
</div>
<div class="method-definition">
<span class="method-result">boolean</span>
<a href="#nettoyer" title="details" class="method-name">nettoyer</a>
([<span class="var-type">string</span> <span class="var-name">$mode</span> = <span class="var-default">self::NETTOYAGE_MODE_TOUS</span>], [<span class="var-type">array|string</span> <span class="var-name">$tags</span> = <span class="var-default">array()</span>])
</div>
<div class="method-definition">
<span class="method-result">boolean</span>
<a href="#sauver" title="details" class="method-name">sauver</a>
(<span class="var-type">mixed</span> <span class="var-name">$donnees</span>, [<span class="var-type">string</span> <span class="var-name">$id</span> = <span class="var-default">null</span>], [<span class="var-type">array</span> <span class="var-name">$tags</span> = <span class="var-default">array()</span>], [<span class="var-type">int</span> <span class="var-name">$duree_de_vie_specifique</span> = <span class="var-default">false</span>])
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#setEmplacement" title="details" class="method-name">setEmplacement</a>
(<span class="var-type">string</span> <span class="var-name">$emplacement</span>)
</div>
<div class="method-definition">
<span class="method-result">boolean</span>
<a href="#supprimer" title="details" class="method-name">supprimer</a>
(<span class="var-type">string</span> <span class="var-name">$id</span>)
</div>
<div class="method-definition">
<span class="method-result">int|false</span>
<a href="#tester" title="details" class="method-name">tester</a>
(<span class="var-type">string</span> <span class="var-name">$id</span>)
</div>
</div>
</div>
</div>
<a name="sec-vars"></a>
<div class="info-box">
<div class="info-box-title">Variables</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
<a href="#sec-const-summary">Constants</a> (<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">
<a name="var$options" id="$options"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">array</span>
<span class="var-name">$options</span>
= <span class="var-default">array(<br /> 'stockage_mode' => self::STOCKAGE_MODE_FICHIER,<br /> 'stockage_chemin' => null, <br /> 'controle_ecriture' => true,<br /> 'mise_en_cache' => true,<br /> 'cache_id_prefixe' => null,<br /> 'serialisation_auto' => false,<br /> 'nettoyage_auto' => 10,<br /> 'duree_de_vie' => 3600,<br /> )</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a85">85</a></span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Les options disponibles pour le cache :</p>
<p class="description"><p>====> (string) stockage_mode : Indique le mode de stockage du cache à utiliser parmis : <ul><li>Cache::STOCKAGE_MODE_FICHIER : sous forme d'une arborescence de fichiers et dossier</li><li>Cache::STOCKAGE_MODE_SQLITE : sous forme d'une base de données SQLite</li></ul> ====> (string) stockage_chemin : Chemin vers : <ul><li>Cache::STOCKAGE_MODE_FICHIER : le dossier devant contenir l'arborescence.</li><li>Cache::STOCKAGE_MODE_SQLITE : le fichier contenant la base SQLite.</li></ul> ====> (boolean) controle_ecriture : <ul><li>Active / Désactive le controle d'écriture (le cache est lue jute après l'écriture du fichier pour détecter sa corruption)</li><li>Activer le controle d'écriture ralentira légèrement l'écriture du fichier de cache mais pas sa lecture</li></ul> Le controle d'écriture peut détecter la corruption de fichier mais ce n'est pas un système de controle parfait.</p><p>====> (boolean) mise_en_cache : <ul><li>Active / Désactive la mise en cache</li
></ul> (peut être très utile pour le débogage des scripts utilisant le cache</p><p>=====> (string) cache_id_prefixe : <ul><li>préfixe pour les identifiant de cache ( = espace de nom)</li></ul> ====> (boolean) serialisation_auto : <ul><li>Active / Désactive la sérialisation automatique</li><li>Peut être utilisé pour sauver directement des données qui ne sont pas des chaines (mais c'est plus lent)</li></ul> ====> (int) nettoyage_auto : <ul><li>Désactive / Régler le processus de nettoyage automatique</li><li>Le processus de nettoyage automatiques détruit les fichier trop vieux (pour la durée de vie donnée)
quand un nouveau fichier de cache est écrit :</li></ul> 0 => pas de nettoyage automatique 1 => nettoyage automatique systématique x (integer) > 1 => nettoyage automatique toutes les 1 fois (au hasard) sur x écriture de fichier de cache</p><p>====> (int) duree_de_vie : <ul><li>Durée de vie du cache (en secondes)</li><li>Si null, le cache est valide indéfiniment.</li></ul></p></p>
<ul class="tags">
<li><span class="field">var:</span> les options disponibles pour le cache .</li>
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$stockage" id="$stockage"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">mixed</span>
<span class="var-name">$stockage</span>
= <span class="var-default"> null</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a96">96</a></span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</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-var-summary">Vars</a> (<a href="#sec-vars">details</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="methodfabriquer" id="fabriquer"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">static fabriquer</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a148">148</a></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">
fabriquer
</span>
(<span class="var-type"></span> <span class="var-name">$mode</span>, [<span class="var-type"></span> <span class="var-name">$options</span> = <span class="var-default">array()</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type"></span>
<span class="var-name">$mode</span> </li>
<li>
<span class="var-type"></span>
<span class="var-name">$options</span> </li>
</ul>
</div>
<a name="methodvaliderIdOuTag" id="validerIdOuTag"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">static validerIdOuTag</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a462">462</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Valide un identifiant de cache ou un tag (securité, nom de fichiers fiables, préfixes réservés...)</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
<div class="method-signature">
static <span class="method-result">void</span>
<span class="method-name">
validerIdOuTag
</span>
(<span class="var-type">string</span> <span class="var-name">$chaine</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$chaine</span><span class="var-description">: Identificant de cache ou tag</span> </li>
</ul>
</div>
<a name="methodvaliderTableauDeTags" id="validerTableauDeTags"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">static validerTableauDeTags</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a480">480</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Valide un tableau de tags (securité, nom de fichiers fiables, préfixes réservés...)</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
<div class="method-signature">
static <span class="method-result">void</span>
<span class="method-name">
validerTableauDeTags
</span>
(<span class="var-type">array</span> <span class="var-name">$tags</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">array</span>
<span class="var-name">$tags</span><span class="var-description">: tableau de tags</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"><a href="../__filesource/fsource_Framework__Cache.php.html#a98">98</a></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> <span class="var-name">$options</span> = <span class="var-default">array()</span>], [<span class="var-type"></span> <span class="var-name">$options_stockage</span> = <span class="var-default">array()</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type"></span>
<span class="var-name">$options</span> </li>
<li>
<span class="var-type"></span>
<span class="var-name">$options_stockage</span> </li>
</ul>
</div>
<a name="methodajouterSupplementDureeDeVie" id="ajouterSupplementDureeDeVie"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">ajouterSupplementDureeDeVie</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a365">365</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Give (if possible) an extra lifetime to the given cache id</p>
<ul class="tags">
<li><span class="field">return:</span> true if ok</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">boolean</span>
<span class="method-name">
ajouterSupplementDureeDeVie
</span>
(<span class="var-type">string</span> <span class="var-name">$id</span>, <span class="var-type"></span> <span class="var-name">$supplement_duree_de_vie</span>, <span class="var-type">int</span> <span class="var-name">$extraLifetime</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$id</span><span class="var-description">: cache id</span> </li>
<li>
<span class="var-type">int</span>
<span class="var-name">$extraLifetime</span> </li>
<li>
<span class="var-type"></span>
<span class="var-name">$supplement_duree_de_vie</span> </li>
</ul>
</div>
<a name="methodcharger" id="charger"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">charger</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a164">164</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Teste si un cache est disponible pour l'identifiant donné et (si oui) le retourne (false dans le cas contraire)</p>
<ul class="tags">
<li><span class="field">return:</span> Cached datas</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">mixed|false</span>
<span class="method-name">
charger
</span>
(<span class="var-type">string</span> <span class="var-name">$id</span>, [<span class="var-type">boolean</span> <span class="var-name">$ne_pas_tester_validiter_du_cache</span> = <span class="var-default">false</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$id</span><span class="var-description">: Identifiant de cache.</span> </li>
<li>
<span class="var-type">boolean</span>
<span class="var-name">$ne_pas_tester_validiter_du_cache</span><span class="var-description">: Si mis à true, la validité du cache n'est pas testée</span> </li>
</ul>
</div>
<a name="methodgetIds" id="getIds"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getIds</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a276">276</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return an array of stored cache ids</p>
<ul class="tags">
<li><span class="field">return:</span> array of stored cache ids (string)</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
getIds
</span>
()
</div>
</div>
<a name="methodgetIdsAvecLesTags" id="getIdsAvecLesTags"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getIdsAvecLesTags</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a299">299</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return an array of stored cache ids which match given tags</p>
<p class="description"><p>In case of multiple tags, a logical AND is made between tags</p></p>
<ul class="tags">
<li><span class="field">return:</span> array of matching cache ids (string)</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
getIdsAvecLesTags
</span>
([<span class="var-type">array</span> <span class="var-name">$tags</span> = <span class="var-default">array()</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">array</span>
<span class="var-name">$tags</span><span class="var-description">: array of tags</span> </li>
</ul>
</div>
<a name="methodgetIdsAvecUnTag" id="getIdsAvecUnTag"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getIdsAvecUnTag</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a327">327</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return an array of stored cache ids which match any given tags</p>
<p class="description"><p>In case of multiple tags, a logical OR is made between tags</p></p>
<ul class="tags">
<li><span class="field">return:</span> array of matching any cache ids (string)</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
getIdsAvecUnTag
</span>
([<span class="var-type">array</span> <span class="var-name">$tags</span> = <span class="var-default">array()</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">array</span>
<span class="var-name">$tags</span><span class="var-description">: array of tags</span> </li>
</ul>
</div>
<a name="methodgetIdsSansLesTags" id="getIdsSansLesTags"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getIdsSansLesTags</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a313">313</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return an array of stored cache ids which don't match given tags</p>
<p class="description"><p>In case of multiple tags, a logical OR is made between tags</p></p>
<ul class="tags">
<li><span class="field">return:</span> array of not matching cache ids (string)</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
getIdsSansLesTags
</span>
([<span class="var-type">array</span> <span class="var-name">$tags</span> = <span class="var-default">array()</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">array</span>
<span class="var-name">$tags</span><span class="var-description">: array of tags</span> </li>
</ul>
</div>
<a name="methodgetMetadonnees" id="getMetadonnees"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getMetadonnees</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a353">353</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return an array of metadatas for the given cache id</p>
<p class="description"><p>The array will include these keys : <ul><li>expire : the expire timestamp</li><li>tags : a string array of tags</li><li>mtime : timestamp of last modification time</li></ul></p></p>
<ul class="tags">
<li><span class="field">return:</span> array of metadatas (false if the cache id is not found)</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
getMetadonnees
</span>
(<span class="var-type">string</span> <span class="var-name">$id</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$id</span><span class="var-description">: cache id</span> </li>
</ul>
</div>
<a name="methodgetPourcentageRemplissage" id="getPourcentageRemplissage"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getPourcentageRemplissage</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a338">338</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return the filling percentage of the backend storage</p>
<ul class="tags">
<li><span class="field">return:</span> integer between 0 and 100</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">int</span>
<span class="method-name">
getPourcentageRemplissage
</span>
()
</div>
</div>
<a name="methodgetTags" id="getTags"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getTags</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a287">287</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return an array of stored tags</p>
<ul class="tags">
<li><span class="field">return:</span> array of stored tags (string)</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">array</span>
<span class="method-name">
getTags
</span>
()
</div>
</div>
<a name="methodgetTimestampExpiration" id="getTimestampExpiration"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getTimestampExpiration</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a495">495</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Calcule et retourne le timestamp d'expiration</p>
<ul class="tags">
<li><span class="field">return:</span> timestamp d'expiration (unix timestamp)</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">int</span>
<span class="method-name">
getTimestampExpiration
</span>
(<span class="var-type"></span> <span class="var-name">$duree_de_vie</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type"></span>
<span class="var-name">$duree_de_vie</span> </li>
</ul>
</div>
<a name="methodnettoyer" id="nettoyer"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">nettoyer</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a254">254</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Nettoyage des enregistrements en cache</p>
<p class="description"><p>Mode de nettoyage disponibles : 'tous' (défaut) => supprime tous les enregistrements ($tags n'est pas utilisé) 'expiration' => supprime tous les enregistrements dont la date d'expériration est dépassée ($tags n'est pas utilisé) 'avecLesTag' => supprime tous les enregistrements contenant tous les tags indiqués 'sansLesTag' => supprime tous les enregistrements contenant aucun des tags indiqués 'avecUnTag' => supprime tous les enregistrements contenant au moins un des tags indiqués</p></p>
<ul class="tags">
<li><span class="field">return:</span> True si ok</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">boolean</span>
<span class="method-name">
nettoyer
</span>
([<span class="var-type">string</span> <span class="var-name">$mode</span> = <span class="var-default">self::NETTOYAGE_MODE_TOUS</span>], [<span class="var-type">array|string</span> <span class="var-name">$tags</span> = <span class="var-default">array()</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$mode</span><span class="var-description">: mode de nettoyage</span> </li>
<li>
<span class="var-type">array|string</span>
<span class="var-name">$tags</span><span class="var-description">: peut être un tableau de chaîne ou une simple chaine.</span> </li>
</ul>
</div>
<a name="methodsauver" id="sauver"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">sauver</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a202">202</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sauvegarde en cache les données passées en paramètre.</p>
<ul class="tags">
<li><span class="field">return:</span> True si aucun problème n'est survenu.</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">boolean</span>
<span class="method-name">
sauver
</span>
(<span class="var-type">mixed</span> <span class="var-name">$donnees</span>, [<span class="var-type">string</span> <span class="var-name">$id</span> = <span class="var-default">null</span>], [<span class="var-type">array</span> <span class="var-name">$tags</span> = <span class="var-default">array()</span>], [<span class="var-type">int</span> <span class="var-name">$duree_de_vie_specifique</span> = <span class="var-default">false</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">mixed</span>
<span class="var-name">$donnees</span><span class="var-description">: Données à mettre en cache (peut être différent d'une chaine si serialisation_auto vaut true).</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$id</span><span class="var-description">: Identifiant du cache (s'il n'est pas définit, le dernier identifiant sera utilisé).</span> </li>
<li>
<span class="var-type">array</span>
<span class="var-name">$tags</span><span class="var-description">: Mots-clés du cache.</span> </li>
<li>
<span class="var-type">int</span>
<span class="var-name">$duree_de_vie_specifique</span><span class="var-description">: Si != false, indique une durée de vie spécifique pour cet enregistrement en cache (null => durée de vie infinie)</span> </li>
</ul>
</div>
<a name="methodsetEmplacement" id="setEmplacement"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">setEmplacement</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a140">140</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Permet de (re-)définir l'emplacement pour le stockage du cache.</p>
<p class="description"><p>En fonction du mode de stockage utilisé , l'emplacement indiqué correspondra au chemin du : <ul><li>dossier où stocker les fichiers pour le mode "fichier".</li><li>fichier de la base de données pour le mode "sqlite".</li></ul></p></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">
setEmplacement
</span>
(<span class="var-type">string</span> <span class="var-name">$emplacement</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$emplacement</span><span class="var-description">: chemin vers dossier (Cache::STOCKAGE_MODE_FICHIER) ou fichier base Sqlite (Cache::STOCKAGE_MODE_SQLITE)</span> </li>
</ul>
</div>
<a name="methodsupprimer" id="supprimer"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">supprimer</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a230">230</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Supprime un enregistrement en cache.</p>
<ul class="tags">
<li><span class="field">return:</span> True si ok</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">boolean</span>
<span class="method-name">
supprimer
</span>
(<span class="var-type">string</span> <span class="var-name">$id</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$id</span><span class="var-description">: Identificant du cache à supprimer.</span> </li>
</ul>
</div>
<a name="methodtester" id="tester"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">tester</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a182">182</a></span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Test if a cache is available for the given id</p>
<ul class="tags">
<li><span class="field">return:</span> Last modified time of cache entry if it is available, false otherwise</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">int|false</span>
<span class="method-name">
tester
</span>
(<span class="var-type">string</span> <span class="var-name">$id</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$id</span><span class="var-description">: Cache id</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-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<a name="constNETTOYAGE_MODE_AVEC_LES_TAGS" id="NETTOYAGE_MODE_AVEC_LES_TAGS"><!-- --></A>
<div class="evenrow">
<div class="const-header">
<img src="../media/images/Variable.png" />
<span class="const-title">
<span class="const-name">NETTOYAGE_MODE_AVEC_LES_TAGS</span>
= <span class="const-default"> "avecLesTags"</span>
(line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a30">30</a></span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">'avecLesTags' : supprime tous les enregistrements contenant tous les tags indiqués.</p>
</div>
<a name="constNETTOYAGE_MODE_AVEC_UN_TAG" id="NETTOYAGE_MODE_AVEC_UN_TAG"><!-- --></A>
<div class="oddrow">
<div class="const-header">
<img src="../media/images/Variable.png" />
<span class="const-title">
<span class="const-name">NETTOYAGE_MODE_AVEC_UN_TAG</span>
= <span class="const-default"> "avecUnTag"</span>
(line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a34">34</a></span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">'avecUnTag' : supprime tous les enregistrements contenant au moins un des tags indiqués.</p>
</div>
<a name="constNETTOYAGE_MODE_EXPIRATION" id="NETTOYAGE_MODE_EXPIRATION"><!-- --></A>
<div class="evenrow">
<div class="const-header">
<img src="../media/images/Variable.png" />
<span class="const-title">
<span class="const-name">NETTOYAGE_MODE_EXPIRATION</span>
= <span class="const-default"> "expiration"</span>
(line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a28">28</a></span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">'expiration' : supprime tous les enregistrements dont la date d'expériration est dépassée.</p>
</div>
<a name="constNETTOYAGE_MODE_SANS_LES_TAGS" id="NETTOYAGE_MODE_SANS_LES_TAGS"><!-- --></A>
<div class="oddrow">
<div class="const-header">
<img src="../media/images/Variable.png" />
<span class="const-title">
<span class="const-name">NETTOYAGE_MODE_SANS_LES_TAGS</span>
= <span class="const-default"> "sansLesTags"</span>
(line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a32">32</a></span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">'sansLesTags' : supprime tous les enregistrements contenant aucun des tags indiqués.</p>
</div>
<a name="constNETTOYAGE_MODE_TOUS" id="NETTOYAGE_MODE_TOUS"><!-- --></A>
<div class="evenrow">
<div class="const-header">
<img src="../media/images/Variable.png" />
<span class="const-title">
<span class="const-name">NETTOYAGE_MODE_TOUS</span>
= <span class="const-default"> "tous"</span>
(line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a26">26</a></span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">'tous' (par défaut) : supprime tous les enregistrements.</p>
</div>
<a name="constSTOCKAGE_MODE_FICHIER" id="STOCKAGE_MODE_FICHIER"><!-- --></A>
<div class="oddrow">
<div class="const-header">
<img src="../media/images/Variable.png" />
<span class="const-title">
<span class="const-name">STOCKAGE_MODE_FICHIER</span>
= <span class="const-default"> "Fichier"</span>
(line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a21">21</a></span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Socke les enregistrements du cache dans des fichiers textes.</p>
</div>
<a name="constSTOCKAGE_MODE_SIMPLE" id="STOCKAGE_MODE_SIMPLE"><!-- --></A>
<div class="evenrow">
<div class="const-header">
<img src="../media/images/Variable.png" />
<span class="const-title">
<span class="const-name">STOCKAGE_MODE_SIMPLE</span>
= <span class="const-default"> "FichierSimple"</span>
(line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a19">19</a></span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Socke les enregistrements du cache dans des fichiers textes de façon extremement simple.</p>
</div>
<a name="constSTOCKAGE_MODE_SQLITE" id="STOCKAGE_MODE_SQLITE"><!-- --></A>
<div class="oddrow">
<div class="const-header">
<img src="../media/images/Variable.png" />
<span class="const-title">
<span class="const-name">STOCKAGE_MODE_SQLITE</span>
= <span class="const-default"> "Sqlite"</span>
(line <span class="line-number"><a href="../__filesource/fsource_Framework__Cache.php.html#a23">23</a></span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Socke les enregistrements du cache dans une base de données SQLite.</p>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Tue, 18 Jan 2011 15:30:39 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
</p>
</div></body>
</html>