Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 3 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3 Rev 117
Line 1... Line 1...
1
<?php 
1
<?php
2
class Outils {
2
class Outils {
-
 
3
 
3
	public static function recupererTableauConfig($param) {
4
	public static function recupererTableauConfig($parametres) {
4
		$tableau = array();
5
		$tableau = array();
5
		$tableauPartiel = explode(',', Config::get($param));
6
		$tableauPartiel = explode(',', Config::get($parametres));
6
		$tableauPartiel = array_map('trim', $tableauPartiel);
7
		$tableauPartiel = array_map('trim', $tableauPartiel);
7
		foreach ($tableauPartiel as $champ) {
8
		foreach ($tableauPartiel as $champ) {
8
			if (strpos($champ, '=') === false) {
9
			if (strpos($champ, '=') === false) {
9
				$tableau[] = $champ;
10
				$tableau[] = $champ;
10
			} else {
11
			} else {
11
				list($cle, $val) = explode('=', $champ);
12
				list($cle, $val) = explode('=', $champ);
-
 
13
				$clePropre = trim($cle);
-
 
14
				$valeurPropre = trim($val);
12
				$tableau[$cle] = $val;
15
				$tableau[$clePropre] = $valeurPropre;
13
			}
16
			}
14
		}
17
		}
15
		return $tableau;
18
		return $tableau;
16
	}
19
	}
17
}
20
}