Subversion Repositories eFlore/Applications.del

Rev

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

Rev 1795 Rev 1806
Line 19... Line 19...
19
 
19
 
Line 20... Line 20...
20
class ListeCommentaires {
20
class ListeCommentaires {
21
 
21
 
22
	private $conteneur;
-
 
23
	private $navigation;
22
	private $conteneur;
24
	private $masque;
-
 
25
	private $bdd;
-
 
Line 26... Line 23...
26
	private $parametres = array();
23
	private $navigation;
27
	private $ressources = array();
24
	private $bdd;
Line 28... Line 25...
28
 
25
 
29
	private $mapping = array();
26
	private $mapping = array();
30
	private $mappingInverse = array();
27
	private $mappingInverse = array();
31
 
-
 
32
	public function __construct(Conteneur $conteneur = null) {
28
 
Line 33... Line 29...
33
		$this->conteneur = ($conteneur == null) ? new Conteneur() : $conteneur;
29
	public function __construct(Conteneur $conteneur = null) {
34
		$this->navigation = $this->conteneur->getNavigation();
30
		$this->conteneur = ($conteneur == null) ? new Conteneur() : $conteneur;
35
		$this->masque = $this->conteneur->getMasque();
31
		$this->navigation = $this->conteneur->getNavigation();
Line 72... Line 68...
72
		return is_array($resultat) ? $resultat : array();
68
		return is_array($resultat) ? $resultat : array();
73
	}
69
	}
Line 74... Line 70...
74
 
70
 
75
	private function creerClauseWhere() {
71
	private function creerClauseWhere() {
76
		$where = array();
72
		$where = array();
77
		$filtres = $this->masque->getMasque();
73
		$filtres = $this->navigation->getFiltre();
78
		if (!empty($filtres)) {
74
		if (!empty($filtres)) {
79
			foreach ($filtres as $cle => $valeur) {
75
			foreach ($filtres as $cle => $valeur) {
80
				$where[] = $this->mappingInverse[$cle].' = '.$this->bdd->proteger($valeur);
76
				$where[] = $this->mappingInverse[$cle].' = '.$this->bdd->proteger($valeur);
81
			}
77
			}