Subversion Repositories eFlore/Applications.del

Rev

Rev 702 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
700 gduche 1
<?php
2
class Outils {
3
 
4
	public static function recupererTableauConfig($parametres) {
5
		$tableau = array();
6
		$tableauPartiel = explode(',', Config::get($parametres));
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);
13
				$clePropre = trim($cle);
14
				$valeurPropre = trim($val);
15
				$tableau[$clePropre] = $valeurPropre;
16
			}
17
		}
18
		return $tableau;
19
	}
20
}
21
?>