| Line 9... |
Line 9... |
| 9 |
* @package Framework
|
9 |
* @package Framework
|
| 10 |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
10 |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
| 11 |
* @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
|
11 |
* @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
|
| 12 |
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
|
12 |
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
|
| 13 |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
|
13 |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
|
| 14 |
* @version $Id: Debug.php 247 2010-12-16 16:47:52Z jpm $
|
14 |
* @version $Id: Debug.php 274 2010-12-28 15:37:22Z jpm $
|
| 15 |
* @link /doc/framework/
|
15 |
* @link /doc/framework/
|
| 16 |
*/
|
16 |
*/
|
| 17 |
class Debug {
|
17 |
class Debug {
|
| Line 18... |
Line 18... |
| 18 |
|
18 |
|
| Line 33... |
Line 33... |
| 33 |
|
33 |
|
| 34 |
/** Mode de php (cli ou sapi) */
|
34 |
/** Mode de php (cli ou sapi) */
|
| Line 35... |
Line 35... |
| 35 |
protected static $mode = null;
|
35 |
protected static $mode = null;
|
| 36 |
|
36 |
|
| Line 37... |
Line 37... |
| 37 |
/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/
|
37 |
/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/
|
| 38 |
private static $parametres_obligatoires = array('fw_debogage', 'fw_debogage_mode');
|
38 |
private static $parametres_obligatoires = array('debogage', 'debogage_mode');
|
| 39 |
|
39 |
|
| 40 |
/**
|
40 |
/**
|
| Line 136... |
Line 136... |
| 136 |
* @param boolean $echo faire un echo du resultat ou non
|
136 |
* @param boolean $echo faire un echo du resultat ou non
|
| 137 |
* @return string la chaine de debogage formatée ou bien null si echo
|
137 |
* @return string la chaine de debogage formatée ou bien null si echo
|
| 138 |
*/
|
138 |
*/
|
| 139 |
private static function traiterDebogage($mot_cle, $sortie, $echo) {
|
139 |
private static function traiterDebogage($mot_cle, $sortie, $echo) {
|
| 140 |
Config::verifierPresenceParametres(self::$parametres_obligatoires);
|
140 |
Config::verifierPresenceParametres(self::$parametres_obligatoires);
|
| 141 |
$debogage = Config::get('fw_debogage');
|
141 |
$debogage = Config::get('debogage');
|
| 142 |
$mode = Config::get('fw_debogage_mode');
|
142 |
$mode = Config::get('debogage_mode');
|
| Line 143... |
Line 143... |
| 143 |
|
143 |
|
| 144 |
$mot_cle = self::formaterMotCle($mot_cle);
|
144 |
$mot_cle = self::formaterMotCle($mot_cle);
|
| Line 145... |
Line 145... |
| 145 |
$sortie = self::traiterSortieSuivantMode($mot_cle, $sortie);
|
145 |
$sortie = self::traiterSortieSuivantMode($mot_cle, $sortie);
|