1,19 → 1,23 |
<?php |
// declare(encoding='UTF-8'); |
/** |
* Navigation gère les url de navigation en fonction d'un départ et d'une limite |
|
* @category php 5.2 |
* @package del |
* @author Grégoire Duché <gregoire@tela-botanica.org> |
* @copyright Copyright (c) 2012, Tela Botanica (accueil@tela-botanica.org) |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL |
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL |
* @version $Id: Bdd.php 403 2012-02-22 14:35:20Z gduche $ |
* Gère les paramètres de type "masque..." utilisés dans l'URL. |
* |
* @category DEL |
* @package Services |
* @subpackage 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 Masque { |
|
const prefixe = 'masque.'; |
const masqueGeneral = 'masque'; |
const PREFIXE = 'masque.'; |
const MASQUE_GENERAL = 'masque'; |
|
private $masquesPossibles; |
private $parametres; |
37,11 → 41,11 |
/** |
* Parcourir le tableau Paramètres pour trouver tous les champs masque |
*/ |
public function chargerMasque() { |
private function chargerMasque() { |
if ($this->parametres != null) { |
foreach ($this->parametres as $id => $parametre) { |
if (strpos($id, self::prefixe) === 0 || $id == self::masqueGeneral) { |
if (in_array(str_replace(self::prefixe, '', $id), $this->masquesPossibles)) { |
if (strpos($id, self::PREFIXE) === 0 || $id == self::MASQUE_GENERAL) { |
if (in_array(str_replace(self::PREFIXE, '', $id), $this->masquesPossibles)) { |
$this->masque[$id] = $parametre; |
} |
} |
71,7 → 75,7 |
* */ |
public function getMasque($id = null) { |
if (isset($id)) { |
return $this->masque[self::prefixe.$id]; |
return $this->masque[self::PREFIXE.$id]; |
} else { |
return $this->masque; |
} |