Subversion Repositories Applications.annuaire

Rev

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

Rev 310 Rev 320
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 'framework/framework/autoload.inc.php';
16
require_once 'framework.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
    	'plugins',
26
    	'plugins',
27
        'composants',
27
        'composants',
28
        'composants'.DS.'cartographie',
28
        'composants'.DS.'cartographie',
29
        'composants'.DS.'openid');
29
        'composants'.DS.'openid');
30
    foreach ($chemins as $chemin) {
30
    foreach ($chemins as $chemin) {
31
        $fichier_a_inclure = dirname(__FILE__).DS.$chemin.DS.$nom_classe.'.php';
31
        $fichier_a_inclure = dirname(__FILE__).DS.$chemin.DS.$nom_classe.'.php';
32
 
32
 
33
        if (file_exists($fichier_a_inclure)) {
33
        if (file_exists($fichier_a_inclure)) {
34
            include_once $fichier_a_inclure;
34
            include_once $fichier_a_inclure;
35
            return null;
35
            return null;
36
        }
36
        }
37
    }
37
    }
38
}
38
}
39
 
39
 
40
?>
40
?>