Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 380 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php
class Nom {
        private $infos = array();

        public function __construct(Array $infos) {
                $this->infos = $infos;
        }
        public function setTaxonsSuperieurs(Array $taxonsSup, $nns) {
                $this->infos['taxonsSup'] = $taxonsSup[$nns];
        }
        
        public function getInfos() {
                return $this->infos;
        }

        public function get($cle) {
                $valeur = '';
                if (array_key_exists($cle, $this->infos)) {
                        $valeur = $this->infos[$cle];
                }
                return $valeur;
        }
        
        public function getTaxonSupRang($rang) {
                $nom_sci = '';
                foreach ($this->infos['taxonsSup'] as $taxon) {
                        if ($taxon['rang.code'] == 'bdnt.rangTaxo:'.$rang) {
                                $nom_sci = $taxon['nom_sci_complet'];
                        }
                }
                return $nom_sci;
        }
}
?>