Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 272 | Rev 294 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 272 Rev 291
1
<?php
1
<?php
2
// declare(encoding='UTF-8');
2
// declare(encoding='UTF-8');
3
/**
3
/**
4
 * Classe mère du module Liste.
4
 * Classe mère du module Liste.
5
 *
5
 *
6
 * @category	PHP 5.2
6
 * @category	PHP 5.2
7
 * @package		eflore-consultation
7
 * @package		eflore-consultation
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
9
 * @author		Delphine CAUQUIL <delphine@tela-botanica.org>
9
 * @author		Delphine CAUQUIL <delphine@tela-botanica.org>
10
 * @copyright	2011 Tela-Botanica
10
 * @copyright	2011 Tela-Botanica
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 Illustrations extends aControleur {
15
class Illustrations extends aControleur {
-
 
16
 
-
 
17
	private $conteneur = null;
-
 
18
	private $nomCourrant = null;
16
	private $imagesCel = null;
19
	private $images = 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->imagesCel = (is_null($images)) ? new Images('cel') : $images;
25
		$this->images = $this->conteneur->getApiImages();
-
 
26
		$this->appUrls = $this->conteneur->getAppUrls();
20
	}
27
	}
21
	
28
 
22
	public function obtenirDonnees($num_nom) {
29
	public function obtenirDonnees() {
23
		$urls = $this->imagesCel->getUrlsImagesParIdsNoms(array($num_nom));
30
		$donnees = array();
24
		$donnees['img'] = $urls['bdtfx.'.$num_nom];
31
		$donnees['cel'] = $this->getCel();
25
		return $donnees;
32
		return $donnees;
26
	}
33
	}
-
 
34
 
-
 
35
	public function getBloc() {
-
 
36
		// Trop long, il faut un service spécial...
-
 
37
		/*
-
 
38
		$this->images->setProjet('cel');
-
 
39
		$nns = $this->nomCourrant->getNns();
-
 
40
		$urls = $this->images->getUrlsImagesParIdsNoms(array($nns));
-
 
41
		$donnees['imageUrl'] = $urls["bdtfx.$nns"][0];
-
 
42
		*/
-
 
43
		return $donnees;
-
 
44
	}
-
 
45
 
-
 
46
	public function getCel() {
-
 
47
		$cel = array();
-
 
48
		$this->images->setProjet('cel');
-
 
49
		$nns = $this->nomCourrant->getNns();
-
 
50
		$urls = $this->images->getUrlsImagesParIdsNoms(array($nns));
-
 
51
		$cel['imagesUrl'] = $urls["bdtfx.$nns"];
-
 
52
 
-
 
53
		$cel['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees('cel');
-
 
54
		return $cel;
-
 
55
	}
27
}
56
}
28
?>
57
?>