Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

<?php
/** Exemple lancement:
 * /opt/lampp/bin/php -d memory_limit=3500M ~/web/eflore-projets/scripts/cli.php bdnt -a chargerTous
*/
class Photoflora extends EfloreScript {

        public function executer() {
                // Lancement de l'action demandée
                try {
                        $this->initialiserProjet('photoflora');

                        $cmd = $this->getParametre('a');
                    switch ($cmd) {
                        case 'chargerTous' :
                                $this->chargerStructureSql();
                                break;
                        case 'chargerStructureSql' :
                                $this->chargerStructureSql();
                                break;
                                case 'chargerOntologies' :
                                        break;
                                case 'supprimerTous' :
                                        $this->supprimerTous();
                                        break;
                                default :
                                        throw new Exception("Erreur : la commande '$cmd' n'existe pas!");
                        }
                } catch (Exception $e) {
                        $this->traiterErreur($e->getMessage());
                }
    }

        private function supprimerTous() {
                $requete = "DROP TABLE IF EXISTS photoflora_meta";
                $this->getBdd()->requeter($requete);
        }
}
?>