Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 1134 → Rev 1135

/trunk/scripts/modules/adeterminer/Adeterminer.php
New file
0,0 → 1,41
<?php
//declare(encoding='UTF-8');
/**
* Exemple de lancement du script : :
* /opt/lampp/bin/php cli.php coste -a chargerTous
*
* @category php 5.2
* @package eFlore/Scripts
* @author Jean-Pascal MILCENT <jpm@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$
*/
class Adeterminer extends DelScript {
 
public function executer() {
try {
$this->initialiserProjet('adeterminer');
 
// Lancement de l'action demandée
$cmd = $this->getParametre('a');
switch ($cmd) {
case 'alerteMail' :
$script = $this->chargerClasse('AlerteMailADeterminer');
$script->executer();
break;
default :
throw new Exception("Erreur : la commande '$cmd' n'existe pas!");
}
} catch (Exception $e) {
$this->traiterErreur($e->getMessage());
}
}
private function chargerClasse($classe) {
require_once $classe.'.php';
return new $classe($this->parametres, $this);
}
}
?>