Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 880 | Details | Compare with Previous | Last modification | View Log | RSS feed

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