From f5c14fc4d955c8ea2a98e05be448b08fa5c5616c Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 31 Mar 2006 16:53:44 +0000 Subject: Fixed #110. --- framework/Util/TVarDumper.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'framework/Util') diff --git a/framework/Util/TVarDumper.php b/framework/Util/TVarDumper.php index 0532a6ec..8cde61fa 100644 --- a/framework/Util/TVarDumper.php +++ b/framework/Util/TVarDumper.php @@ -42,13 +42,20 @@ class TVarDumper * @param integer maximum depth that the dumper should go into the variable. Defaults to 10. * @return string the string representation of the variable */ - public static function dump($var,$depth=10) + public static function dump($var,$depth=10,$highlight=false) { self::$_output=''; self::$_objects=array(); self::$_depth=$depth; self::dumpInternal($var,0); - return self::$_output; + if($highlight) + { + Prado::using('System.3rdParty.geshi.geshi'); + $geshi = new GeSHi(self::$_output, 'vardump'); + return $geshi->parse_code(); + } + else + return self::$_output; } private static function dumpInternal($var,$level) -- cgit v1.2.3