39,7 → 39,8 |
* il contiendra alors l'ensemble des paramêtres suivant trouvés sur la ligne de commande. |
* @var array |
*/ |
private $_parametres_autorises = array( '-a' => array(true, true, 'Action à réaliser'), |
private $_parametres_autorises = array( '-p' => array(true, true, 'Projet, le nom utiliser pour le fichier ini'), |
'-a' => array(true, true, 'Action à réaliser'), |
'-v' => array(false, '1', 'Mode verbeux : 1 ou 2'), |
'-t' => array(false, '', 'Test sur un nombre de ligne...')); |
/** |
105,10 → 106,15 |
$this->setParam($parametres); |
} |
|
|
// Tableaux des emplacements des fichiers ini à rechercher et à charger dans l'ordre du tableau |
$projet_prefixe = ''; |
if (preg_match('/^([^_]+)/', $this->getParam('p'), $match)) { |
$projet_prefixe = $match[1]; |
} |
$tab_fichiers_ini = array( ES_CHEMIN_CONFIG.'bdd.ini', // Paramêtres de la base de données |
ES_CHEMIN_CONFIG.'commun.ini', // Paramêtres communs aux différents projets |
$this->getModuleChemin().DS.'configurations'.DS.'config.ini'); |
$this->getModuleChemin().$this->getParam('p').'.ini', |
$this->getModuleChemin().DS.'configurations'.DS.$this->getParam('p').'.ini'); |
|
// Chargement des fichiers ini généraux |
for ($i = 0; $i < 2 ; $i++) { |
117,6 → 123,17 |
trigger_error($e, E_USER_WARNING); |
} |
} |
// Chargement du fichier ini du projet |
$erreur_ini_projet = true; |
for ($i = 2; $i < 4 ; $i++) { |
if ($this->parserFichierIni($tab_fichiers_ini[$i])) { |
$erreur_ini_projet = false; |
} |
} |
if ($erreur_ini_projet) { |
$e = "Le fichier .ini du projet est introuvable : \n".$tab_fichiers_ini[2]."\n".$tab_fichiers_ini[3]."\n"; |
trigger_error($e, E_USER_WARNING); |
} |
} |
|
abstract public function executer(); |