Subversion Repositories Applications.framework

Rev

Rev 230 | Rev 244 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 230 Rev 241
Line 10... Line 10...
10
 * @package	Framework
10
 * @package	Framework
11
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
11
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
12
 * @author		Delphine CAUQUIL <delphine@tela-botanica.org>
12
 * @author		Delphine CAUQUIL <delphine@tela-botanica.org>
13
 * @copyright	Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
13
 * @copyright	Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
14
 * @license	http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
14
 * @license	http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
15
 * @license	http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2 
15
 * @license	http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
-
 
16
 * @since 		0.3 
16
 * @version	SVN : $Id$
17
 * @version	$Id$
17
 * @link		/doc/framework/
18
 * @link		/doc/framework/
18
 */
19
 */
Line 19... Line 20...
19
 
20
 
Line -... Line 21...
-
 
21
class Cli {
-
 
22
	
-
 
23
	/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/
-
 
24
	private static $parametres_obligatoires = array('chemin_modules');
20
class Cli {
25
	
21
	
26
	
22
	/**
27
	/**
23
	 * Execute la ligne de commande en récupérant le nom du script à lancer et ses paramètres.
28
	 * Execute la ligne de commande en récupérant le nom du script à lancer et ses paramètres.
24
	 * Instancie la classe du script à lancer et appelle la méthode executer().
29
	 * Instancie la classe du script à lancer et appelle la méthode executer().
Line 51... Line 56...
51
		exit(0);
56
		exit(0);
52
	}
57
	}
Line 53... Line 58...
53
	
58
	
54
	private static function charger($script_nom, $parametres) {
59
	private static function charger($script_nom, $parametres) {
-
 
60
		$Script = null;
Line 55... Line 61...
55
		$Script = null;
61
		Config::verifierPresenceParametres(self::$parametres_obligatoires);
56
		
62
		
Line 57... Line 63...
57
		$classe_nom = implode('', array_map('ucfirst', explode('_', strtolower($script_nom))));
63
		$classe_nom = implode('', array_map('ucfirst', explode('_', strtolower($script_nom))));