Subversion Repositories Applications.annuaire

Rev

Rev 208 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
68 aurelien 1
<?php
2
/**
3
* PHP Version 5
4
*
5
* @category  PHP
6
* @package   annuaire
7
* @author    aurelien <aurelien@tela-botanica.org>
8
* @copyright 2010 Tela-Botanica
9
* @license   http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
10
* @version   SVN: <svn_id>
11
* @link      /doc/annuaire/
12
*/
13
 
14
// La fonction autolad doit être appelée avant tout autre chose dans l'application.
15
// Sinon, rien ne sera chargé.
91 aurelien 16
require_once '/home/aurelien/web/framework/framework/autoload.inc.php';
68 aurelien 17
Application::setChemin(__FILE__);
18
Application::setInfo(Config::get('info'));
19
mb_internal_encoding(Config::get('appli_encodage'));
115 aurelien 20
date_default_timezone_set(Config::get('fw_timezone'));
68 aurelien 21
 
22
// Autoload pour cette application
23
function __autoload($nom_classe) {
24
    // Tableau des chemins à inclure pour trouver une classe relative à ce fichier
25
    $chemins = array(
26
        'composants',
27
        'composants'.DS.'cartographie',
28
        'composants'.DS.'openid');
29
    foreach ($chemins as $chemin) {
30
        $fichier_a_inclure = dirname(__FILE__).DS.$chemin.DS.$nom_classe.'.php';
31
 
32
        if (file_exists($fichier_a_inclure)) {
33
            include_once $fichier_a_inclure;
34
            return null;
35
        }
36
    }
37
}
91 aurelien 38
 
68 aurelien 39
?>