Subversion Repositories Applications.framework

Rev

Rev 274 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 274 Rev 365
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 274 2010-12-28 15:37:22Z jpm $
14
 * @version	$Id: Debug.php 365 2011-09-30 08:19:57Z jpm $
15
 * @link		/doc/framework/
15
 * @link		/doc/framework/
16
 */
16
 */
17
class Debug {
17
class Debug {
Line 18... Line 18...
18
	   
18
	   
Line 172... Line 172...
172
	 * @param string $mot_cle le mot clé associé à la chaine
172
	 * @param string $mot_cle le mot clé associé à la chaine
173
	 * @param string  $sortie la chaine de débogage
173
	 * @param string  $sortie la chaine de débogage
174
	 * @return string la sortie formatée pour le mode en cours
174
	 * @return string la sortie formatée pour le mode en cours
175
	 */
175
	 */
176
	private static function traiterSortieSuivantMode($mot_cle, $sortie) {
176
	private static function traiterSortieSuivantMode($mot_cle, $sortie) {
177
		$corps = $mot_cle.PHP_EOL.$sortie;
177
		$mode_actuel = Config::get('debogage_mode');
178
		if (self::getMode() == 'cli') {
178
		if ($mode_actuel == self::MODE_ENTETE_HTTP) {
-
 
179
			$cle = (empty($mot_cle)) ? 'message' : $mot_cle;
179
			$sortie = PHP_EOL.$corps.PHP_EOL;
180
			$sortie = "$cle:$sortie";
180
		} else {
181
		} else {
-
 
182
			$corps = $mot_cle.PHP_EOL.$sortie;
-
 
183
			if (self::getMode() == 'cli') {
-
 
184
				$sortie = PHP_EOL.$corps.PHP_EOL;
-
 
185
			} else {
181
			$sortie = '<pre>'.$corps.'</pre>';
186
				$sortie = '<pre>'.$corps.'</pre>';
-
 
187
			}
182
		}
188
		}
183
		return $sortie;
189
		return $sortie;
184
	}
190
	}
185
}
191
}
186
?>
192
?>
187
193