Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 290 → Rev 291

/trunk/modules/fiche/formateurs/Repartition.php
13,40 → 13,48
* @version $Id$
*/
class Repartition extends aControleur {
 
private $conteneur = null;
private $nomCourrant = null;
private $tailleBloc = "190x178";
private $serviceChorodep = null;
public function __construct($num_nom = null, $type = null, $taille = 630) {
$this->initialiser($num_nom, $type, $taille);
 
public function __construct(Conteneur $conteneur) {
$this->conteneur = $conteneur;
$this->nomCourrant = $this->conteneur->getNomCourrant();
$this->cartes = $this->conteneur->getApiCartes();
$this->meta = $this->conteneur->getApiMetaDonnees();
$this->appUrls = $this->conteneur->getAppUrls();
}
public function initialiser($num_nom, $type, $taille = 630) {
$this->serviceChorodep = new Cartes('chorodep', $num_nom, $type, $taille);
$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();
 
public function obtenirDonnees() {
$donnees['chorodep'] = $this->getChorodep();
return $donnees;
}
public function getUrlDataSvg() {
return $this->serviceChorodep->getUrlDataSvg();
 
public function getChorodep() {
$this->cartes->setProjet('chorodep');
$this->cartes->setLargeur('630');
$id = 'nn:'.$this->nomCourrant->getNns();
$this->cartes->setId($id);
$chorodep['svgUrl'] = $this->cartes->getUrlDataSvg();
$chorodep['pngUrl'] = $this->cartes->getUrlPng();
$chorodep['legende'] = $this->cartes->getLegende();
$this->meta->setProjet('chorodep');
$meta = $this->meta->getMetaDonnees();
$citation = $meta[0]['citation'];
$chorodep['meta']['citation'] = $citation;
$chorodep['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees('chorodep');
return $chorodep;
}
public function getUrlPng() {
return $this->serviceChorodep->getUrlPng();
 
public function getBloc() {
$this->cartes->setProjet('chorodep');
$this->cartes->setLargeur('190x178');
$id = 'nn:'.$this->nomCourrant->getNns();
$this->cartes->setId($id);
$donnees['carteUrl'] = $this->cartes->getUrlPng();
return $donnees;
}
public function getLegende () {
return $this->serviceChorodep->getLegende();
}
public function getMetaDonnees () {
return $this->serviceMetaDonneesChorodep->getMetaDonnees();
}
}
?>