Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 80 Rev 87
Line 43... Line 43...
43
	 * @param Array $parametres le tableau de parametres (sans accolades pour les clés).*/
43
	 * @param Array $parametres le tableau de parametres (sans accolades pour les clés).*/
44
	protected function formaterUrl($tpl, Array $parametres) {
44
	protected function formaterUrl($tpl, Array $parametres) {
45
		$parametres = $this->ajouterParametreParDefaut($parametres);
45
		$parametres = $this->ajouterParametreParDefaut($parametres);
46
		foreach ($parametres as $cle => $valeur) {
46
		foreach ($parametres as $cle => $valeur) {
47
			$cle = '{'.$cle.'}';
47
			$cle = '{'.$cle.'}';
48
			$parametres[$cle] = $valeur;
48
			$parametres[$cle] = str_replace(' ','+',$valeur);
49
		}
49
		}
50
		$url = strtr($tpl, $parametres);
50
		$url = strtr($tpl, $parametres);
51
		return $url;
51
		return $url;
52
	}
52
	}