1: <?php
2:
3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14:
15:
16:
17: if (!defined('DS')) {
18: define('DS', DIRECTORY_SEPARATOR);
19: }
20:
21: if (!defined('PS')) {
22: define('PS', PATH_SEPARATOR);
23: }
24:
25:
26: function autoloadFw($nom_classe_fw) {
27: $fichier_a_inclure = dirname(__FILE__).DS.$nom_classe_fw.'.php';
28: if (file_exists($fichier_a_inclure)) {
29: include_once $fichier_a_inclure;
30: return null;
31: }
32: }
33: spl_autoload_register('autoloadFw');
34:
35:
36: GestionnaireException::initialiser();
37:
38:
39: function autoloadAppliDefaut($nom_classe) {
40: $dossiers_classes = array( Config::get('chemin_controleurs'),
41: Config::get('chemin_modeles'),
42: Config::get('chemin_bibliotheque'));
43:
44: foreach ($dossiers_classes as $chemin) {
45: $fichier_a_tester = $chemin.$nom_classe.'.php';
46: if (file_exists($fichier_a_tester)) {
47: include_once $fichier_a_tester;
48: return null;
49: }
50: }
51: }
52: spl_autoload_register('autoloadAppliDefaut');
53:
54:
55: if (function_exists('__autoload')) {
56: spl_autoload_register('__autoload');
57: }
58: ?>