Rev 1793 | Blame | Last modification | View Log | RSS feed
<?php// declare(encoding='UTF-8');/*** Classe contenant des méthodes utilitaires.** Mettre les méthodes utilitaires dans cette classe, de temps en temps, si plusieurs méthodes ont une* intéraction entre elles ou peuvent être regroupées. Les rassembler dans une nouvelle classe et mettre à* jour le code.** @category DEL* @package Services* @package Bibliotheque* @version 0.1* @author Mathias CHOUET <mathias@tela-botanica.org>* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>* @author Aurelien PERONNET <aurelien@tela-botanica.org>* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>* @copyright 1999-2014 Tela Botanica <accueil@tela-botanica.org>*/class Outils {public static function recupererTableauConfig($parametres) {$tableau = array();$tableauPartiel = explode(',', Config::get($parametres));$tableauPartiel = array_map('trim', $tableauPartiel);foreach ($tableauPartiel as $champ) {if (strpos($champ, '=') === false) {$tableau[] = $champ;} else {list($cle, $val) = explode('=', $champ);$clePropre = trim($cle);$valeurPropre = trim($val);$tableau[$clePropre] = $valeurPropre;}}return $tableau;}}