Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 365 Rev 420
Line 15... Line 15...
15
					$json = new Services_JSON;
15
					$json = new Services_JSON;
16
				}
16
				}
17
				return $json->decode($content);
17
				return $json->decode($content);
18
			}
18
			}
19
		}
19
		}
20
		
20
 
21
		if ( !function_exists('json_encode') ){
21
		if ( !function_exists('json_encode') ){
22
			function json_encode($content){
22
			function json_encode($content){
23
				$json = new Services_JSON;
23
				$json = new Services_JSON;
24
				return $json->encode($content);
24
				return $json->encode($content);
25
			}
25
			}
Line 70... Line 70...
70
 
70
 
71
	private function transformerReponseCorpsSuivantMime() {
71
	private function transformerReponseCorpsSuivantMime() {
72
		switch ($this->resultatService->mime) {
72
		switch ($this->resultatService->mime) {
73
			case 'application/json' :
73
			case 'application/json' :
74
				if (isset($_GET['callback'])) {
74
				if (isset($_GET['callback'])) {
75
					$contenu = $_GET['callback'].'('.json_encode($donnees).');';
75
					$contenu = $_GET['callback'].'('.json_encode($this->resultatService->corps).');';
76
				} else {
76
				} else {
77
					$contenu = json_encode($this->resultatService->corps);
77
					$contenu = json_encode($this->resultatService->corps);
78
				}
78
				}
79
				$this->resultatService->corps = $contenu;
79
				$this->resultatService->corps = $contenu;