Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 1487 → Rev 1527

/trunk/jrest/lib/RechercheInfosTaxonBeta.php
24,11 → 24,17
private $url_service_chorologie = null;
private $masque_recherche = null;
private $code_referentiel = 'bdtfx';
public function RechercheInfosTaxonBeta($config, $code_referentiel = 'bdtfx') {
parent::__construct($config);
$this->code_referentiel = $code_referentiel;
$this->formaterUrlsServices($config);
}
public function RechercheInfosTaxonBeta($config) {
parent::__construct($config);
$this->url_service_nom = $config['eflore']['url_service_nom'];
$this->url_service_taxon = $config['eflore']['url_service_taxon'];
private function formaterUrlsServices($config) {
$this->url_service_nom = str_replace('{referentiel}', $this->code_referentiel ,$config['eflore']['url_service_nom']);
$this->url_service_taxon = str_replace('{referentiel}', $this->code_referentiel ,$config['eflore']['url_service_taxon']);
$this->url_service_chorologie_obs = $config['eflore']['url_service_chorologie_obs'];
}
176,7 → 182,6
}
public function rechercherNumTaxSurNumNom($num_nom) {
$nt = null;
$url = $this->url_service_nom."/".$num_nom.'?retour.champs=num_taxonomique';
$resultat = @file_get_contents($url);
222,7 → 227,7
$identifiant_espece=utf8_encode($identifiant_espece);
$retour = array();
//TODO: voir ce qu'on fait pour l'import de différent référentiels
preg_match('/BDNFFnn([0-9][0-9]*)/',$identifiant_espece, $elements);
if (isset($elements[1])) {
// Numero nomenclatural