/opt/lamp/bin/php cli.php migration_optimisation -a migrer * * @category CEL * @package Scripts * @subpackage Migration : Optimisation * @author Mathias CHOUET * @author Jean-Pascal MILCENT * @author Aurelien PERONNET * @license GPL v3 * @license CECILL v2 * @copyright 1999-2014 Tela Botanica */ class MigrationOptimisation extends CelScript { public function executer() { try { $this->initialiserProjet('migration_optimisation'); // Lancement de l'action demandée $cmd = $this->getParametre('a'); switch ($cmd) { case 'maj' : $script = $this->chargerClasse('MajOptimisation'); $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'; $conteneur = new Conteneur($this->parametres); return new $classe($conteneur); } }