New file |
0,0 → 1,52 |
<?php |
// declare(encoding='UTF-8'); |
/** |
* Classe Controleur générale de l'application Collection. |
* |
* @category php5.2 |
* @package Collection |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
* @copyright 2010 Tela-Botanica |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL |
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL |
* @version SVN: $Id$ |
*/ |
abstract class ColControleur { |
|
const RENDU_TETE = 'tete'; |
const RENDU_CORPS = 'corps'; |
const RENDU_PIED = 'pied'; |
|
private $sortie = array(); |
private $parametres = array(); |
private $url = null; |
|
public function __construct() { |
$registre = Registre::getInstance(); |
$this->parametres = $registre->get('parametres'); |
$this->url = $this->parametres['url']; |
parent::__construct(); |
} |
|
/** |
* Fonction d'affichage par défaut, elle appelle la liste des administrateurs |
*/ |
protected function setSortie($position, $contenu, $fusionner = false) { |
if ($position != self::RENDU_TETE && |
$position != self::RENDU_CORPS && |
$position != self::RENDU_PIED) { |
trigger_error("La position '$position' n'existe pas", E_USER_WARNING); |
} else { |
if ($fusionner) { |
$this->sortie[$position] .= $contenu; |
} else { |
$this->sortie[$position] = $contenu; |
} |
} |
} |
public function getSortie() { |
return $this->sortie; |
} |
|
|
} |