35,17 → 35,34 |
extract($options); |
$this->mise_en_cache = is_bool($mise_en_cache) ? $mise_en_cache : true; |
|
if ($this->mise_en_cache) { |
// cache inactif |
if (!$this->mise_en_cache) return; |
|
$this->stockage_chemin = isset($stockage_chemin) ? realpath($stockage_chemin) : Fichier::getDossierTmp(); |
if(!realpath($stockage_chemin)) { |
error_log(sprintf("%s: Attention, %s invalide: creation [%s]", |
__FILE__, |
$stockage_chemin, |
$_SERVER['REQUEST_URI'])); |
|
mkdir($stockage_chemin, 0755, TRUE); |
} |
if(!realpath($stockage_chemin)) { |
error_log(sprintf("%s: Attention, realpath(%s) invalide [%s]", |
__FILE__, |
$stockage_chemin, |
$_SERVER['REQUEST_URI'])); |
return; |
} |
else if(!is_writable(realpath($stockage_chemin))) { |
error_log(sprintf("%s: Attention, realpath(%s) non-inscriptible [%s]", |
__FILE__, |
realpath($stockage_chemin), |
$_SERVER['REQUEST_URI'])); |
return; |
} |
$this->duree_de_vie = isset($duree_de_vie) ? $duree_de_vie : 3600*24; |
} |
} |
|
private function initialiserOptionsParConfig() { |
while (list($nom, $valeur) = each($this->options)) { |