Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 291 | Go to most recent revision | Blame | Last modification | View Log | RSS feed

<?php
// declare(encoding='UTF-8');
/**
 * Classe mère du module Liste.
 *
 * @category    PHP 5.2
 * @package             eflore-consultation
 * @author              Jean-Pascal MILCENT <jpm@tela-botanica.org>
 * @author              Delphine CAUQUIL <delphine@tela-botanica.org>
 * @copyright   2011 Tela-Botanica
 * @license             http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
 * @license             http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
 * @version             $Id$
 */
class Repartition extends aControleur {

        private $conteneur = null;
        private $nomCourant = null;
        private $tailleBloc = "190x178";
        private $serviceChorodep = null;

        public function __construct(Conteneur $conteneur) {
                $this->conteneur = $conteneur;
                $this->nomCourant = $this->conteneur->getNomCourant();
                $this->cartes = $this->conteneur->getApiCartes();
                $this->meta = $this->conteneur->getApiMetaDonnees();
                $this->appUrls = $this->conteneur->getAppUrls();
        }

        public function obtenirDonnees() {
                $donnees['chorodep'] = $this->getChorodep();
                return $donnees;
        }

        public function getChorodep() {
                $this->cartes->setProjet('chorodep');
                $this->cartes->setLargeur('630');
                $id = 'nn:'.$this->nomCourant->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 getBloc() {
                $this->cartes->setProjet('chorodep');
                $this->cartes->setLargeur('190x178');
                $id = 'nn:'.$this->nomCourant->getNns();
                $this->cartes->setId($id);
                $donnees['carteUrl'] = $this->cartes->getUrlPng();
                return $donnees;
        }
}
?>