| 4 |
jpm |
1 |
<?php
|
|
|
2 |
// declare(encoding='UTF-8');
|
|
|
3 |
/**
|
| 7 |
jpm |
4 |
* Application de consultation des Collections.
|
|
|
5 |
* Fichier principal d'initialisation.
|
| 4 |
jpm |
6 |
*
|
| 7 |
jpm |
7 |
* @category PHP5
|
|
|
8 |
* @package Collection
|
|
|
9 |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
|
|
10 |
* @copyright 2010 Tela-Botanica
|
|
|
11 |
* @license GPL-v3 et CECILL-v2
|
|
|
12 |
* @version SVN:<svn_id>
|
| 4 |
jpm |
13 |
*/
|
|
|
14 |
|
| 7 |
jpm |
15 |
// La fonction autoload du Framework de Tela Botanica doit être appelée avant tout autre chose dans l'application.
|
| 4 |
jpm |
16 |
// Sinon, rien ne sera chargé.
|
|
|
17 |
require_once dirname(__FILE__).'/../framework/framework/autoload.inc.php';
|
|
|
18 |
|
| 7 |
jpm |
19 |
// Autoload pour cette application
|
|
|
20 |
function __autoload($nom_classe) {
|
|
|
21 |
// Tableau des chemins à inclure pour trouver une classe relatif à ce fichier
|
|
|
22 |
$chemins = array(
|
|
|
23 |
'bibliotheque'.DS.'noyau',
|
|
|
24 |
'bibliotheque'.DS.'pear',
|
|
|
25 |
'bibliotheque'.DS.'utilitaires',
|
|
|
26 |
'composants');
|
|
|
27 |
foreach ($chemins as $chemin) {
|
|
|
28 |
$fichier_a_inclure = dirname(__FILE__).DS.$chemin.DS.$nom_classe.'.php';
|
|
|
29 |
if (file_exists($fichier_a_inclure)) {
|
|
|
30 |
include_once $fichier_a_inclure;
|
|
|
31 |
return null;
|
|
|
32 |
}
|
|
|
33 |
}
|
| 4 |
jpm |
34 |
}
|
|
|
35 |
|
| 7 |
jpm |
36 |
// Ajout d'information concernant cette application
|
|
|
37 |
Application::setChemin(__FILE__);
|
|
|
38 |
Application::setInfo(Config::get('info'));
|
| 4 |
jpm |
39 |
|
| 7 |
jpm |
40 |
// Lancement de l'application
|
|
|
41 |
Collection::initialiser();
|
| 4 |
jpm |
42 |
?>
|