/trunk/modules/fiche/formateurs/Repartition.php |
---|
15,11 → 15,21 |
class Repartition extends aControleur { |
private $serviceChorodep = null; |
public function __construct($num_nom, $type = 'nn') { |
public function initialiser($num_nom, $type) { |
$this->serviceChorodep = new Cartes('chorodep', $num_nom, $type); |
$this->serviceMetaDonneesChorodep = new MetaDonnees('chorodep'); |
} |
public function obtenirDonnees($num_nom, $type = 'nn') { |
$this->initialiser($num_nom, $type); |
$donnees['svg'] = $this->getUrlDataSvg(); |
$donnees['png'] = $this->getUrlPng(); |
$donnees['legende'] = $this->getLegende(); |
$donnees['metadonnees'] = $this->getMetaDonnees(); |
return $donnees; |
} |
public function getUrlDataSvg() { |
return $this->serviceChorodep->getUrlDataSvg(); |
} |
/trunk/modules/fiche/Fiche.php |
---|
60,15 → 60,10 |
} |
private function obtenirDonnees($donnees = array()) { |
if ($this->onglet == 'illustrations') { |
$ill = new Illustrations(); |
$donnees['img'] = $ill->obtenirDonnees($this->num_nom); |
} else if ($this->onglet == 'repartition') { |
$repartition = new Repartition($this->num_nom); |
$donnees['svg'] = $repartition->getUrlDataSvg(); |
$donnees['png'] = $repartition->getUrlPng(); |
$donnees['legende'] = $repartition->getLegende(); |
$donnees['metadonnees'] = $repartition->getMetaDonnees(); |
if ($this->onglet != 'synthese') { |
$classe = ucfirst($this->onglet); |
$metier = new $classe(); |
$donnees = $metier->obtenirDonnees($this->num_nom); |
} |
return $donnees; |
} |