Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 153 Rev 195
Line 35... Line 35...
35
 
35
 
36
	public static function chargerClasseAuto($classe) {
36
	public static function chargerClasseAuto($classe) {
37
		if (class_exists($classe)) {
37
		if (class_exists($classe)) {
38
			return null;
38
			return null;
39
		}
39
		}
40
		$cheminBase = realpath(__DIR__.'/../modules/0.1').'/';
40
		$cheminBase = realpath(__DIR__.'/../../modules/0.1').'/';
41
		$cheminsTests = __DIR__.'/';
41
		$cheminsTests = __DIR__.'/';
42
		$chemins = array($cheminBase, $cheminsTests);
42
		$chemins = array($cheminBase, $cheminsTests);
43
		foreach ($chemins as $chemin) {
43
		foreach ($chemins as $chemin) {
44
			$chemin = $chemin.$classe.'.php';
44
			$chemin = $chemin.$classe.'.php';
Line 47... Line 47...
47
			}
47
			}
48
		}
48
		}
49
	}
49
	}
Line 50... Line 50...
50
 
50
 
51
	private static function chargerFramework() {
51
	private static function chargerFramework() {
52
		$cheminRacine = realpath(dirname(__FILE__).'/..').'/';
52
		$cheminRacine = realpath(dirname(__FILE__).'/../..').'/';
53
		$framework =  $cheminRacine.'framework.php';
53
		$framework =  $cheminRacine.'framework.php';
54
		if (!file_exists($framework)) {
54
		if (!file_exists($framework)) {
55
			$e = "Veuillez paramétrer l'emplacement et la version du Framework dans le fichier $framework";
55
			$e = "Veuillez paramétrer l'emplacement et la version du Framework dans le fichier $framework";
56
			trigger_error($e, E_USER_ERROR);
56
			trigger_error($e, E_USER_ERROR);