Subversion Repositories eFlore/Applications.cel

Rev

Rev 1536 | Rev 1580 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1536 Rev 1539
Line 166... Line 166...
166
	private function recupererListeTaxon() {
166
	private function recupererListeTaxon() {
167
		$taxons = null;
167
		$taxons = null;
168
		$fichier_tsv = dirname(__FILE__).self::DS.'configurations'.self::DS.$this->projet.'_taxons.tsv';
168
		$fichier_tsv = dirname(__FILE__).self::DS.'configurations'.self::DS.$this->projet.'_taxons.tsv';
169
		if (file_exists($fichier_tsv) && is_readable($fichier_tsv)) {
169
		if (file_exists($fichier_tsv) && is_readable($fichier_tsv)) {
170
			$taxons = $this->decomposerFichierTsv($fichier_tsv);
170
			$taxons = $this->decomposerFichierTsv($fichier_tsv);
171
			$taxons = self::trierTableauMd($taxons, array('nom_fr' => SORT_ASC));
171
			$taxons = self::trierTableauMd($taxons, array('nom_fr' => SORT_ASC));
172
		} else {
172
		} else {
173
			$this->debug[] = "Impossible d'ouvrir le fichier '$fichier_tsv'.";
173
			$this->debug[] = "Impossible d'ouvrir le fichier '$fichier_tsv'.";
174
		}
174
		}
175
		return $taxons;
175
		return $taxons;
176
	}
176
	}
Line 214... Line 214...
214
 
214
 
215
	private function executerChargementInfosTaxon($num_nom) {
215
	private function executerChargementInfosTaxon($num_nom) {
216
		$url_service_infos = sprintf($this->config['chemins']['infosTaxonUrl'], $this->NS_PROJET, $num_nom);
216
		$url_service_infos = sprintf($this->config['chemins']['infosTaxonUrl'], $this->NS_PROJET, $num_nom);
217
		$infos = json_decode(file_get_contents($url_service_infos));
217
		$infos = json_decode(file_get_contents($url_service_infos));
218
		$resultat = array();
218
		$resultat = array();
219
		if(isset($infos) && !empty($infos)) {
219
		if (isset($infos) && !empty($infos)) {
220
			$infos = (array)$infos;
220
			$infos = (array)$infos;
221
			$resultat = (isset($infos['nom_sci']) && $infos['nom_sci'] != '') ? $infos : array();
221
			$resultat = (isset($infos['nom_sci']) && $infos['nom_sci'] != '') ? $infos : array();
222
		}
222
		}
223
		return $resultat;
223
		return $resultat;