/trunk/metier/api_0.1/Cartes.php |
---|
96,5 → 96,14 |
return $donnees; |
} |
// version statique de getUrlPng() ci-dessus |
static function getCarteUrlPng($projet, $id, $largeur) { |
return Eflore::s_formaterUrl(Config::get('carteTpl'), |
array('projet' => $projet, |
'id' => $id, |
'largeur' => $largeur, |
'mime-type' => 'image/png')); |
} |
} |
?> |
/trunk/metier/api_0.1/Eflore.php |
---|
112,5 → 112,15 |
return $this->restClient; |
} |
static function s_formaterUrl($tpl, Array $parametres) { |
foreach($parametres as $key => $value) { |
if(is_array($value)) { |
$value = implode(',', $value); |
} |
$tpl = str_replace('{'.$key.'}',rawurlencode($value), $tpl); |
} |
return $tpl; |
} |
} |
?> |