Line 53... |
Line 53... |
53 |
$this->config = $conteneur->getParametre('Cartes');
|
53 |
$this->config = $conteneur->getParametre('Cartes');
|
54 |
$this->convertisseur = $this->config['convertisseur'];
|
54 |
$this->convertisseur = $this->config['convertisseur'];
|
55 |
$this->tableMeta = $conteneur->getParametre('bdd_table_meta');
|
55 |
$this->tableMeta = $conteneur->getParametre('bdd_table_meta');
|
56 |
$this->tableOntologie = $conteneur->getParametre('bdd_table_ontologies');
|
56 |
$this->tableOntologie = $conteneur->getParametre('bdd_table_ontologies');
|
57 |
$this->cheminCartesBase = $this->config['chemin'];
|
57 |
$this->cheminCartesBase = $this->config['chemin'];
|
58 |
$cacheOptions = array('mise_en_cache' => $this->config['cache']['miseEnCache'],
|
58 |
$cacheOptions = array('mise_en_cache' => $this->config['cache_miseEnCache'],
|
59 |
'stockage_chemin' => $this->config['cache']['stockageChemin'],
|
59 |
'stockage_chemin' => $this->config['cache_stockageChemin'],
|
60 |
'duree_de_vie' => $this->config['cache']['dureeDeVie']);
|
60 |
'duree_de_vie' => $this->config['cache_dureeDeVie']);
|
61 |
$this->cache = $conteneur->getCacheSimple($cacheOptions);
|
61 |
$this->cache = $conteneur->getCacheSimple($cacheOptions);
|
62 |
}
|
62 |
}
|
Line 63... |
Line 63... |
63 |
|
63 |
|
64 |
public function consulter($ressources, $parametres) {
|
64 |
public function consulter($ressources, $parametres) {
|
Line 450... |
Line 450... |
450 |
return $png;
|
450 |
return $png;
|
451 |
}
|
451 |
}
|
Line 452... |
Line 452... |
452 |
|
452 |
|
453 |
private function convertirEnPNGAvecRsvg($svg) {
|
453 |
private function convertirEnPNGAvecRsvg($svg) {
|
454 |
$idFichier = $this->getIdFichier();
|
454 |
$idFichier = $this->getIdFichier();
|
455 |
$fichierPng = $this->config['cache']['stockageChemin'].$idFichier.'.png';
|
455 |
$fichierPng = $this->config['cache_stockageChemin'].$idFichier.'.png';
|
456 |
$fichierSvg = $this->config['cache']['stockageChemin'].$idFichier.'.svg';
|
456 |
$fichierSvg = $this->config['cache_stockageChemin'].$idFichier.'.svg';
|
457 |
file_put_contents($fichierSvg, $svg);
|
457 |
file_put_contents($fichierSvg, $svg);
|
458 |
$commande = "rsvg-convert $fichierSvg -d 75 -p 75 -o $fichierPng";
|
458 |
$commande = "rsvg-convert $fichierSvg -d 75 -p 75 -o $fichierPng";
|
Line 459... |
Line 459... |
459 |
$rsvg = exec($commande);
|
459 |
$rsvg = exec($commande);
|