Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 1012 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1012 Rev 1014
Line 18... Line 18...
18
*/
18
*/
19
class SophyCartes {
19
class SophyCartes {
Line 20... Line 20...
20
	
20
	
21
	const MIME_TEXT = 'text/plain';
21
	const MIME_TEXT = 'text/plain';
-
 
22
	const MIME_PNG = 'image/png';
Line 22... Line 23...
22
	const MIME_PNG = 'image/png';
23
	const MIME_JSON = 'application/json';
Line 23... Line 24...
23
	
24
	
24
	private $types_cartes_autorises = array('flore-probable');  
25
	private $types_cartes_autorises = array('flore-probable');  
Line 60... Line 61...
60
	public function formerCarteFloreProbable($num_fournier) {
61
	public function formerCarteFloreProbable($num_fournier) {
Line 61... Line 62...
61
 
62
 
62
		$resultat = new ResultatService();
63
		$resultat = new ResultatService();
Line 63... Line 64...
63
		$url = sprintf(Config::get('chemin_cartes_tpl'), $num_fournier);
64
		$url = sprintf(Config::get('chemin_cartes_tpl'), $num_fournier);
64
		
65
		
Line 65... Line 66...
65
		$resultat->corps = ($this->format_retour == self::MIME_PNG) ? self::getCartePng($url) : $url;
66
		$resultat->corps = ($this->format_retour == self::MIME_PNG) ? self::getCartePng($url) : array('binaire.href' => $url);
66
		$resultat->mime = ($this->format_retour == self::MIME_PNG) ? self::MIME_PNG : self::MIME_TEXT;
67
		$resultat->mime = ($this->format_retour == self::MIME_PNG) ? self::MIME_PNG : self::MIME_JSON;
Line 67... Line 68...
67
 
68