summaryrefslogtreecommitdiff
path: root/framework/Util
diff options
context:
space:
mode:
authorxue <>2006-03-31 16:53:44 +0000
committerxue <>2006-03-31 16:53:44 +0000
commitf5c14fc4d955c8ea2a98e05be448b08fa5c5616c (patch)
treec1f5268fdc344587fad2776354aca113fdda4f92 /framework/Util
parentcf5bdd1f8f3919f06ee3f8de9d71ff156fada0ab (diff)
Fixed #110.
Diffstat (limited to 'framework/Util')
-rw-r--r--framework/Util/TVarDumper.php11
1 files changed, 9 insertions, 2 deletions
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)