Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev Author Line No. Line
309 aurelien 1
<?php
2
/** Exemple lancement:
3
 * /opt/lampp/bin/php -d memory_limit=3500M ~/web/eflore-projets/scripts/cli.php bdnt -a chargerTous
4
*/
5
class Photoflora extends EfloreScript {
6
 
7
	public function executer() {
8
		// Lancement de l'action demandée
9
		try {
10
			$this->initialiserProjet('photoflora');
11
 
12
			$cmd = $this->getParametre('a');
13
		    switch ($cmd) {
14
		    	case 'chargerTous' :
15
		    		$this->chargerStructureSql();
16
		    		break;
17
	    		case 'chargerStructureSql' :
18
	    			$this->chargerStructureSql();
19
	    			break;
20
				case 'chargerOntologies' :
21
					break;
22
				case 'supprimerTous' :
23
					$this->supprimerTous();
24
					break;
25
				default :
26
					throw new Exception("Erreur : la commande '$cmd' n'existe pas!");
27
			}
28
		} catch (Exception $e) {
29
			$this->traiterErreur($e->getMessage());
30
		}
31
    }
32
 
33
	private function supprimerTous() {
34
		$requete = "DROP TABLE photoflora_meta";
35
		$this->getBdd()->requeter($requete);
36
	}
37
}
38
?>