Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 283 Rev 291
Line 11... Line 11...
11
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
11
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
12
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
12
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
13
 * @version		$Id$
13
 * @version		$Id$
14
 */
14
 */
15
class Nomenclature extends aControleur {
15
class Nomenclature extends aControleur {
-
 
16
 
-
 
17
	private $conteneur = null;
-
 
18
	private $nomCourrant = null;
16
	private $nom = null;
19
	private $noms = null;
-
 
20
	private $meta = null;
17
	
21
 
18
	public function __construct(Images $images = null) {
22
	public function __construct(Conteneur $conteneur) {
-
 
23
		$this->conteneur = $conteneur;
-
 
24
		$this->nomCourrant = $this->conteneur->getNomCourrant();
19
		$this->nom = (is_null($nom)) ? new Noms() : $nom;
25
		$this->noms = $this->conteneur->getApiNoms();
-
 
26
		$this->appUrls = $this->conteneur->getAppUrls();
20
	}
27
	}
21
	
28
 
22
	public function obtenirDonnees($num_nom) {
29
	public function obtenirDonnees() {
-
 
30
		$donnees = array();
23
		$donnees['synonymes'] = $this->nom->getSynonymes($num_nom);//print_r($donnees['synonymes']);
31
		$donnees['synonymes'] = $this->getSynonymes();
24
		return $donnees;
32
		return $donnees;
25
	}
33
	}
-
 
34
 
-
 
35
	public function getBloc() {
-
 
36
		$synonymes = $this->getSynonymes();
-
 
37
		$donnees['synonymesNbre'] = count($synonymes);
-
 
38
		return $donnees;
-
 
39
	}
-
 
40
 
-
 
41
	private function getSynonymes() {
-
 
42
		$nns = $this->nomCourrant->getNns();
-
 
43
		$synonymes = $this->noms->getSynonymes($nns);
-
 
44
		return $synonymes['resultat'];
-
 
45
	}
26
}
46
}
27
?>
47
?>
28
48