Subversion Repositories Applications.annuaire

Rev

Rev 68 | Rev 94 | Go to most recent revision | 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'));
20
 
21
// Autoload pour cette application
22
function __autoload($nom_classe) {
23
    // Tableau des chemins à inclure pour trouver une classe relative à ce fichier
24
    $chemins = array(
25
        'bibliotheque'.DS.'noyau',
26
        'bibliotheque'.DS.'pear',
27
        'bibliotheque'.DS.'utilitaires',
28
        'composants',
29
        'composants'.DS.'cartographie',
30
        'composants'.DS.'openid');
31
    foreach ($chemins as $chemin) {
32
        $fichier_a_inclure = dirname(__FILE__).DS.$chemin.DS.$nom_classe.'.php';
33
 
34
        if (file_exists($fichier_a_inclure)) {
35
            include_once $fichier_a_inclure;
36
            return null;
37
        }
38
    }
39
}
91 aurelien 40
 
68 aurelien 41
?>