Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 447 | Rev 525 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php

/**
* Classe Informations.php redirige vers le web service pour baseflor ou pour les rangs supérieurs
*  
* Encodage en entrée : utf8
* Encodage en sortie : utf8
* @package eflore-projets
* @author Mathilde SALTHUN-LASSALLE <mathilde@tela-botanica.org>
* @author Jean-Pascal MILCENT <jpm@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>
* @version 1.0
* @copyright 1999-2011 Tela Botanica (accueil@tela-botanica.org)
*/

class Informations extends Commun{
        
        private $info_tables = array('InformationsBaseflor', 'InformationsTaxonsSup');
        
        public function consulter($ressources, $parametres) {
        
                        $versionResultat = null;
                        foreach ($this->info_tables as $info_tab) {
                                $info = new $info_tab();
                                $versionResultat = $info->consulter($ressources, $parametres);
                                if($versionResultat != null) {
                                        break;
                                }
                        }
                        
                        if ($versionResultat == null) {
                                $message = 'Les données recherchées sont introuvables.';
                                $code = RestServeur::HTTP_CODE_RESSOURCE_INTROUVABLE;
                                throw new Exception($message, $code);
                        }

                return $versionResultat;
        }
        
        
        
        
}