Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 86 Rev 165
Line 13... Line 13...
13
 * @version		$Id$
13
 * @version		$Id$
14
 */
14
 */
15
class NomsVernaculaires extends Eflore {
15
class NomsVernaculaires extends Eflore {
Line 16... Line 16...
16
	
16
	
-
 
17
	
-
 
18
	public function getRechercheEtendue($nom, $type_resultat = '') {
-
 
19
		$methode = 'getUrlRecherche'.$type_resultat;
-
 
20
		if (method_exists($this, $methode)) {
17
	
21
			$url = $this->$methode($nom, 'etendue');
-
 
22
		} else {
-
 
23
			$url = $this->getUrlRecherche($nom, 'etendue');
18
	public function getRechercheEtendue($nom) {
24
			Debug::printr("Le type de recherche demandé '$type_resultat' n'est pas disponible.");
19
		$url = $this->getUrlRecherche($nom, 'etendue');
25
		}
Line 20... Line 26...
20
		return $this->chargerDonnees($url);
26
		return $this->chargerDonnees($url);
21
	}
27
	}
22
	
28
	
23
	public function getRechercheFloue($nom) {
29
	public function getRechercheFloue($nom, $type_resultat = '') {
Line 24... Line 30...
24
		$url = $this->getUrlRecherche($nom, 'floue');
30
		$url = $this->getUrlRecherche($nom, 'floue');
25
		return $this->chargerDonnees($url);
31
		return $this->chargerDonnees($url);
26
	}
32
	}
27
	
33
	
28
	private function getUrlRecherche($nom, $typeRech) {
34
	private function getUrlRecherche($nom, $typeRech) {
29
		$tpl = Config::get('nomsVernaRechercheTpl');
35
		$tpl = Config::get('nomsVernaRechercheTpl');
-
 
36
		$params = array('valeur' => $nom, 'type' => $typeRech);
-
 
37
		Debug::printr($params,'Params');
-
 
38
		$url = $this->formaterUrl($tpl, $params);
-
 
39
		Debug::printr($tpl,'TPL');
-
 
40
		Debug::printr($url,'URL');
-
 
41
		return $url;
-
 
42
	}
-
 
43
	
-
 
44
	private function getUrlRechercheDetermination($nom, $typeRech) {
-
 
45
		$tpl = Config::get('nomsVernaRechercheTpl');
30
		$params = array('valeur' => $nom, 'type' => $typeRech);
46
		$params = array('valeur' => $nom, 'type' => $typeRech);
31
		Debug::printr($params,'Params');
47
		Debug::printr($params,'Params');
32
		$url = $this->formaterUrl($tpl, $params);
48
		$url = $this->formaterUrl($tpl, $params);
33
		Debug::printr($tpl,'TPL');
49
		Debug::printr($tpl,'TPL');
34
		Debug::printr($url,'URL');
50
		Debug::printr($url,'URL');
35
		return $url;
51
		return $url;