20,6 → 20,7 |
|
const MIME_TEXT = 'text/plain'; |
const MIME_PNG = 'image/png'; |
const MIME_JSON = 'application/json'; |
|
private $types_cartes_autorises = array('flore-probable'); |
|
62,8 → 63,8 |
$resultat = new ResultatService(); |
$url = sprintf(Config::get('chemin_cartes_tpl'), $num_fournier); |
|
$resultat->corps = ($this->format_retour == self::MIME_PNG) ? self::getCartePng($url) : $url; |
$resultat->mime = ($this->format_retour == self::MIME_PNG) ? self::MIME_PNG : self::MIME_TEXT; |
$resultat->corps = ($this->format_retour == self::MIME_PNG) ? self::getCartePng($url) : array('binaire.href' => $url); |
$resultat->mime = ($this->format_retour == self::MIME_PNG) ? self::MIME_PNG : self::MIME_JSON; |
|
return $resultat; |
} |