Subversion Repositories Applications.framework

Rev

Rev 98 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 98 Rev 105
Line 1... Line 1...
1
<?php
1
<?php
-
 
2
// declare(encoding='UTF-8');
2
/**
3
/**
3
 * Fichier contenant la fonction de chargement automatique de classes, il doit toujours rester à la racine
4
 * Fichier contenant la fonction de chargement automatique de classes, il doit toujours rester à la racine
4
 * du framework car il initialise le chemin de l'application en se basant sur son propre emplacement.
5
 * du framework car il initialise le chemin de l'application en se basant sur son propre emplacement.
5
 * 
6
 * 
6
 * PHP Version 5.1.2
7
 * PHP Version 5.1.2
7
 * 
8
 * 
8
 * @category  Fichier_De_Fonctions
9
 * @category  Fichier_De_Fonctions
Line 15... Line 16...
15
 * @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
16
 * @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
16
 * @version $$Id$$
17
 * @version $$Id$$
17
 * @copyright 1999-2009 Tela Botanica (accueil@tela-botanica.org)
18
 * @copyright 1999-2009 Tela Botanica (accueil@tela-botanica.org)
18
 */
19
 */
Line 19... Line 20...
19
 
20
 
20
// Redéfinition de la constante DIRECTORY_SEPARATOR
21
// Redéfinition de la constante DIRECTORY_SEPARATOR
21
if (!defined('DS')) { 
22
if (!defined('DS')) { 
22
	define('DS', DIRECTORY_SEPARATOR);  
23
	define('DS', DIRECTORY_SEPARATOR);  
23
}
24
}
24
// Redéfinition de la constante PATH_SEPARATOR
25
// Redéfinition de la constante PATH_SEPARATOR
25
if (!defined('PS')) { 
26
if (!defined('PS')) { 
26
	define('PS', PATH_SEPARATOR);  
27
	define('PS', PATH_SEPARATOR);  
Line 27... Line 28...
27
}
28
}
Line 34... Line 35...
34
		return null;
35
		return null;
35
	}
36
	}
36
}
37
}
37
spl_autoload_register('autoloadFw');
38
spl_autoload_register('autoloadFw');
Line 38... Line 39...
38
 
39
 
39
// Autoload par défaut pour l'application
40
// Autoload par défaut pour l'application
40
function autoloadAppliDefaut($nom_classe) {
41
function autoloadAppliDefaut($nom_classe) {
41
	$dossiers_classes = array(	Config::get('chemin_controleurs'),
42
	$dossiers_classes = array(	Config::get('chemin_controleurs'),
42
								Config::get('chemin_modeles'),
43
								Config::get('chemin_modeles'),
Line 50... Line 51...
50
		}
51
		}
51
	}
52
	}
52
}
53
}
53
spl_autoload_register('autoloadAppliDefaut');
54
spl_autoload_register('autoloadAppliDefaut');
Line 54... Line 55...
54
 
55
 
55
// Autoload définit par l'application
56
// Autoload défini par l'application
56
if (function_exists('__autoload')) {
57
if (function_exists('__autoload')) {
57
	spl_autoload_register('__autoload');
58
	spl_autoload_register('__autoload');
58
}
59
}
59
?>
60
?>