Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 508 Rev 510
Line 6... Line 6...
6
	protected $messages = array();
6
	protected $messages = array();
7
	protected $debug = array();
7
	protected $debug = array();
Line 8... Line 8...
8
		
8
		
9
	public function __construct($config, $parametres) {
9
	public function __construct($config, $parametres) {
-
 
10
		$this->config = $config;
10
		$this->config = $config;
11
		$this->parserFichierIni($config['chemins']['widgetCourantDossier'].'config.ini');
11
		$this->parametres = $parametres;
12
		$this->parametres = $parametres;
Line -... Line 13...
-
 
13
	}
-
 
14
	
-
 
15
	/**
-
 
16
	 * Parse le fichier ini donné en paramètre
-
 
17
	 * @param string $fichier_ini nom du fichier ini à parser
-
 
18
	 * @return boolean true si le fichier ini a été trouvé.
-
 
19
	 */
-
 
20
	private function parserFichierIni($fichier_ini) {
-
 
21
		$retour = false;
-
 
22
		if (file_exists($fichier_ini)) {
-
 
23
			$ini = parse_ini_file($fichier_ini, true);
-
 
24
			$this->fusionner($ini);
-
 
25
			$retour = true;
-
 
26
		}
-
 
27
		return $retour;
-
 
28
	}
-
 
29
 
-
 
30
	/**
-
 
31
	 * fusionne un tableau de paramètres avec le tableau de config global
-
 
32
	 * @param array $ini le tableau à fusionner
-
 
33
	 */
-
 
34
	private function fusionner(array $ini) {
-
 
35
		$this->config = array_merge($this->config, $ini);
12
	}
36
	}
13
	
37
	
14
	protected function traiterNomMethodeExecuter($nom) {
38
	protected function traiterNomMethodeExecuter($nom) {
15
		$methode = 'executer';
39
		$methode = 'executer';
16
		$methode .= str_replace(' ', '', ucwords(str_replace('-', ' ', strtolower($nom))));
40
		$methode .= str_replace(' ', '', ucwords(str_replace('-', ' ', strtolower($nom))));