Source for file modifier.debug_print_var.php
Documentation is available at modifier.debug_print_var.php
* Smarty debug_print_var modifier plugin
* Name: debug_print_var<br>
* Purpose: formats variable contents for display in the console
* @link http://smarty.php.net/manual/en/language.modifier.debug.print.var.php
* debug_print_var (Smarty online manual)
* @author Monte Ohrt <monte at ohrt dot com>
$results =
'<b>Array (' .
count($var) .
')</b>';
foreach ($var as $curr_key =>
$curr_val) {
$results .=
'<br>' .
str_repeat(' ', $depth *
2)
.
'<b>' .
strtr($curr_key, $_replace) .
'</b> => '
$results =
'<b>' .
get_class($var) .
' Object (' .
count($object_vars) .
')</b>';
foreach ($object_vars as $curr_key =>
$curr_val) {
$results .=
'<br>' .
str_repeat(' ', $depth *
2)
.
'<b> ->' .
strtr($curr_key, $_replace) .
'</b> = '
} elseif (false ===
$var) {
} elseif (null ===
$var) {
$results =
'<i>' .
$results .
'</i>';
$results =
strtr($var, $_replace);
if (strlen($var) >
$length ) {
$results =
substr($var, 0, $length -
3) .
'...';
$results =
strtr((string)
$var, $_replace);
if (strlen($results) >
$length ) {
$results =
substr($results, 0, $length -
3) .
'...';
/* vim: set expandtab: */
Documentation generated on Sun, 09 Mar 2008 23:52:22 -0300 by phpDocumentor 1.4.0