Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 1048 Rev 1084
Line 58... Line 58...
58
			$tpl = str_replace('{'.$key.'}',rawurlencode($value),$tpl);
58
			$tpl = str_replace('{'.$key.'}',rawurlencode($value),$tpl);
59
		}
59
		}
60
		return $tpl;
60
		return $tpl;
61
	}
61
	}
Line 62... Line 62...
62
 
62
 
63
	private function ajouterParametreParDefaut(Array $parametres) {
63
	public function ajouterParametreParDefaut(Array $parametres) {
64
		$parametres['projet'] = isset($parametres['projet']) ? $parametres['projet'] : $this->projet;
64
		$parametres['projet'] = isset($parametres['projet']) ? $parametres['projet'] : $this->projet;
65
		return $parametres;
65
		return $parametres;
Line 66... Line 66...
66
	}
66
	}
Line 111... Line 111...
111
		}
111
		}
112
		return $this->restClient;
112
		return $this->restClient;
113
	}
113
	}
Line 114... Line 114...
114
 
114
 
115
 
115
 
116
	static function s_formaterUrl($tpl, Array $parametres) {
116
	static function s_formaterUrl($tpl, Array $parametres, $enc = TRUE) {
117
		foreach($parametres as $key => $value) {
117
		foreach($parametres as $key => $value) {
118
			if(is_array($value)) {
118
			if(is_array($value)) {
119
				$value = implode(',', $value);
119
				$value = implode(',', $value);
120
			}
120
			}
121
			$tpl = str_replace('{'.$key.'}',rawurlencode($value), $tpl);
121
			$tpl = str_replace('{'.$key.'}',$enc ? rawurlencode($value) : $value, $tpl);
122
		}
122
		}
123
		return $tpl;
123
		return $tpl;
124
	}
124
	}
125
}
125
}