1,45 → 1,42 |
<?php |
// declare(encoding='UTF-8'); |
/** |
* Application |
* Application de consultation des Collections. |
* Fichier principal d'initialisation. |
* |
* PHP version 5 |
* |
* @category PHP |
* @package Framework |
* @author Aurelien PERONNET <aurelien@tela-botanica.org> |
* @copyright Tela-Botanica 2009 |
* @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$$ |
* @link /doc/framework/ |
* @category PHP5 |
* @package Collection |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
* @copyright 2010 Tela-Botanica |
* @license GPL-v3 et CECILL-v2 |
* @version SVN:<svn_id> |
*/ |
|
// La fonction autolad doit être appelée avant tout autre chose dans l'application. |
// La fonction autoload du Framework de Tela Botanica doit être appelée avant tout autre chose dans l'application. |
// Sinon, rien ne sera chargé. |
require_once dirname(__FILE__).'/../framework/framework/autoload.inc.php'; |
Application::setChemin(__FILE__); |
Application::setInfo(Config::get('info')); |
/** |
* Fonction d'affichage de Papyrus, pour le corps de page |
*/ |
function afficherContenuCorps() { |
return 'CONTENU_CORPS'; |
} |
|
function afficherContenuTete() { |
return 'CONTENU_TETE'; |
// Autoload pour cette application |
function __autoload($nom_classe) { |
// Tableau des chemins à inclure pour trouver une classe relatif à ce fichier |
$chemins = array( |
'bibliotheque'.DS.'noyau', |
'bibliotheque'.DS.'pear', |
'bibliotheque'.DS.'utilitaires', |
'composants'); |
foreach ($chemins as $chemin) { |
$fichier_a_inclure = dirname(__FILE__).DS.$chemin.DS.$nom_classe.'.php'; |
if (file_exists($fichier_a_inclure)) { |
include_once $fichier_a_inclure; |
return null; |
} |
} |
} |
|
function afficherContenuPied() { |
return 'CONTENU_PIED'; |
} |
// Ajout d'information concernant cette application |
Application::setChemin(__FILE__); |
Application::setInfo(Config::get('info')); |
|
function afficherContenuNavigation() { |
return 'CONTENU_NAVIGATION'; |
} |
|
function afficherContenuMenu() { |
return 'CONTENU_MENU'; |
} |
// Lancement de l'application |
Collection::initialiser(); |
?> |