12,13 → 12,18 |
* @author Delphine CAUQUIL <delphine@tela-botanica.org> |
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org) |
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3 |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2 |
* @version SVN : $Id$ |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2 |
* @since 0.3 |
* @version $Id$ |
* @link /doc/framework/ |
*/ |
|
class Cli { |
|
/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/ |
private static $parametres_obligatoires = array('chemin_modules'); |
|
|
/** |
* Execute la ligne de commande en récupérant le nom du script à lancer et ses paramètres. |
* Instancie la classe du script à lancer et appelle la méthode executer(). |
53,6 → 58,7 |
|
private static function charger($script_nom, $parametres) { |
$Script = null; |
Config::verifierPresenceParametres(self::$parametres_obligatoires); |
|
$classe_nom = implode('', array_map('ucfirst', explode('_', strtolower($script_nom)))); |
$fichier_script = Config::get('chemin_modules').$script_nom.DS.$classe_nom.'.php'; |