Array (".count($var).")";
foreach ($var as $curr_key => $curr_val) {
$return = smarty_modifier_debug_print_var($curr_val, $depth+1);
$results .= '
\r'.str_repeat(' ', $depth*2)."$curr_key => $return";
}
return $results;
} else if (is_object($var)) {
$object_vars = get_object_vars($var);
$results = "".get_class($var)." Object (".count($object_vars).")";
foreach ($object_vars as $curr_key => $curr_val) {
$return = smarty_modifier_debug_print_var($curr_val, $depth+1);
$results .= '
\r'.str_repeat(' ', $depth*2)."$curr_key => $return";
}
return $results;
} else {
if (empty($var) && $var != "0") {
return 'empty';
}
if (strlen($var) > $length ) {
$results = substr($var, 0, $length-3).'...';
} else {
$results = $var;
}
$results = preg_replace("![\r\t\n]!", " ", $results);
$results = htmlspecialchars($results);
return $results;
}
}
/* vim: set expandtab: */
?>