Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 110 Rev 111
Line 2... Line 2...
2
class ReponseHttp {
2
class ReponseHttp {
Line 3... Line 3...
3
 
3
 
4
	private $resultatService = null;
4
	private $resultatService = null;
Line -... Line 5...
-
 
5
	private $erreurs = array();
-
 
6
 
-
 
7
	public function __construct() {
-
 
8
		$this->resultatService = new ResultatService();
5
	private $erreurs = array();
9
	}
6
 
10
 
7
	public function setResultatService($resultat) {
-
 
8
		if (!($resultat instanceof ResultatService)) {
11
	public function setResultatService($resultat) {
9
			$this->resultatService = new ResultatService();
12
		if (!($resultat instanceof ResultatService)) {
10
			$this->resultatService->corps = $resultat;
13
			$this->resultatService->corps = $resultat;
11
		} else {
14
		} else {
12
			$this->resultatService = $resultat;
15
			$this->resultatService = $resultat;
Line 13... Line 16...
13
		}
16
		}
14
	}
17
	}
15
 
18
 
16
	public function getCorps() {
19
	public function getCorps() {
17
		if ($this->etreEnErreur()) {
20
		if ($this->etreEnErreur()) {
18
			$this->resultatService->corps = $this->erreursHttp[0]['message'];
21
			$this->resultatService->corps = $this->erreurs[0]['message'];
19
		} else {
22
		} else {
20
			$this->transformerReponseCorpsSuivantMime();
23
			$this->transformerReponseCorpsSuivantMime();