Subversion Repositories Applications.annuaire

Rev

Rev 115 | Rev 310 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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