Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 332 → Rev 333

/trunk/modules/fiche/formateurs/Classification.php
13,9 → 13,43
* @version $Id$
*/
class Classification extends aControleur {
public function obtenirDonnees($num_nom) {
$donnees = null;
private $conteneur = null;
private $nomCourant = null;
private $taxons = null;
 
public function __construct(Conteneur $conteneur) {
$this->conteneur = $conteneur;
$this->nomCourant = $this->conteneur->getNomCourant();
$this->taxons = $this->conteneur->getApiTaxons();
$this->meta = $this->conteneur->getApiMetaDonnees();
$this->appUrls = $this->conteneur->getAppUrls();
}
 
public function obtenirDonnees() {
$donnees['taxons_sup'] = $this->getTaxonsSuperieurs();
$donnees['taxons_inf'] = $this->getTaxonsInferieurs();
$this->meta->setProjet('bdtfx');
$meta = $this->meta->getMetaDonnees();
$titreMeta = $meta[0]['titre'];
$donnees['meta']['titre'] = $titreMeta;
$donnees['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees('bdtfx');
return $donnees;
}
private function getTaxonsInferieurs() {
$num_nom = $this->nomCourant->getNomRetenu()->get('id');
$resultat = $this->taxons->getTaxonsInf($num_nom);
return $resultat[$num_nom];
}
private function getTaxonsSuperieurs() {
$num_nom = $this->nomCourant->getNomRetenu()->get('id');
$resultat = $this->taxons->getTaxonsSup($num_nom);
return $resultat[$num_nom];
}
}
?>