Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 745 → Rev 746

/trunk/controleurs/aControleur.php
28,6 → 28,8
protected $urlBase = null;
protected $urlCourante = null;
protected $urls = null;
protected $cache = null;
 
public function __construct(AppUrls $urls = null) {
$chemin = Config::get('chemin_modules').
39,6 → 41,8
$this->urlCourante = Registre::get('eFlore.urlCourante');
$this->urlRedirection = Registre::get('eFlore.urlRedirection');
$this->urls = (is_null($urls)) ? new AppUrls() : $urls;
$this->cache = new CacheSimple(array("mise_en_cache" => Config::get("cache"), "stockage_chemin" => Config::get("chemincache"), "duree_de_vie" => Config::get("dureecache")));
 
parent::__construct();
}
281,6 → 285,16
return $url;
}
 
 
public function obtenirCache($id) {
$retour = unserialize($this->cache->charger($id));
if ($retour == false) {
$retour = null;
}
return $retour;
}
public function mettreEnCache($id, $donnees) {
$this->cache->sauver(serialize($donnees), $id);
}
}
?>