Subversion Repositories eFlore/Applications.coel-consultation

Rev

Rev 9 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
9 jpm 1
<?php
2
// declare(encoding='UTF-8');
3
/**
4
 * Classe Controleur générale de l'application Collection.
5
 *
6
 * @category	php5.2
7
 * @package		Collection
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
9
 * @copyright	2010 Tela-Botanica
10
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
11
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
12
 * @version		SVN: $Id: ColControleur.php 10 2010-03-05 14:15:42Z jpm $
13
 */
14
abstract class ColControleur {
15
 
16
	const RENDU_TETE = 'tete';
17
	const RENDU_CORPS = 'corps';
18
	const RENDU_PIED = 'pied';
19
 
20
	private $sortie = array();
21
	private $parametres = array();
22
	private $url = null;
23
 
24
	public function __construct()  {
25
		$registre = Registre::getInstance();
26
		$this->parametres = $registre->get('parametres');
27
		$this->url = $this->parametres['url'];
28
		parent::__construct();
29
	}
30
 
31
	/**
32
	 * Fonction d'affichage par défaut, elle appelle la liste des administrateurs
33
	 */
34
	protected function setSortie($position, $contenu, $fusionner = false) {
35
		if ($position != self::RENDU_TETE &&
36
			$position != self::RENDU_CORPS &&
37
			$position != self::RENDU_PIED) {
38
			trigger_error("La position '$position' n'existe pas", E_USER_WARNING);
39
		} else {
40
			if ($fusionner) {
41
				$this->sortie[$position] .= $contenu;
42
			} else {
43
				$this->sortie[$position] = $contenu;
44
			}
45
		}
46
	}
47
	public function getSortie() {
48
		return $this->sortie;
49
	}
50
 
51
 
52
}