Subversion Repositories eFlore/Applications.del

Rev

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

Rev 1795 Rev 1837
Line 43... Line 43...
43
		$commentaire = $this->formaterCommentaires($commentaire);
43
		$commentaire = $this->formaterCommentaires($commentaire);
44
		$this->navigation->setTotal(count($commentaire));
44
		$this->navigation->setTotal(count($commentaire));
Line 45... Line 45...
45
 
45
 
46
		// Mettre en forme le résultat et l'envoyer pour affichage*/
46
		// Mettre en forme le résultat et l'envoyer pour affichage*/
47
		$resultat = new ResultatService();
47
		$resultat = new ResultatService();
Line 48... Line 48...
48
		$resultat->corps = array('entete' => $this->navigation->getEntete(), 'resultats' => $commentaire);
48
		$resultat->corps = $commentaire;
49
 
49
 
Line 50... Line 50...
50
		return $resultat;
50
		return $resultat;
Line 64... Line 64...
64
		return is_array($resultat) ? $resultat : array();
64
		return is_array($resultat) ? $resultat : array();
65
	}
65
	}
Line 66... Line 66...
66
 
66
 
67
	private function formaterCommentaires($infos) {
67
	private function formaterCommentaires($infos) {
68
		$retour = array();
-
 
69
		$idCommentaire = $infos['id_commentaire'];
68
		$retour = array();
70
		foreach ($this->mapping as $nomChampBdd => $nomAttributSortie) {
69
		foreach ($this->mapping as $nomChampBdd => $nomAttributSortie) {
71
			$retour[$idCommentaire][$nomAttributSortie] = $infos[$nomChampBdd];
70
			$retour[$nomAttributSortie] = $infos[$nomChampBdd];
72
		}
71
		}
73
		return $retour;
72
		return $retour;
74
	}
73
	}
75
}
74
}