includes/Utils.php
/**
     * Prints variable formatted structure and value of variable
     *
     * @param mixed $var
     * @param bool $exit
     * @param bool $displayTrace
     */
Prints variable formatted structure and value of variable
@param mixed $var
@param bool $exit
@param bool $displayTrace
Prints variable formatted structure and value of variable @param mixed $var @param bool $exit @param bool $displayTrace
public static function debugVariable($var, $exit = false, $displayTrace = true) {
        $debugTraceArray = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT);
        $debugTrace = $debugTraceArray[1];
        $debugVar = print_r($var, true);
        $smarty = Display::getSmarty();
        $smarty->assign('DEBUG_VAR', $debugVar);
        if ($displayTrace) {
            $smarty->assign('STACK_TRACE', $debugTrace);
        }
        $smarty->display('string:' . @file_get_contents('webroot/Errors/tpls/debugTrace.htpl'));
        if ($exit) {
            exit();
        }
    }
public static function debugVariable ( $ var , $ exit = false , $ displayTrace = true ) { $ debugTraceArray = debug_backtrace ( DEBUG_BACKTRACE_PROVIDE_OBJECT ) ; $ debugTrace = $ debugTraceArray [ 1 ] ; $ debugVar = print_r ( $ var , true ) ; $ smarty = Display :: getSmarty ( ) ; $ smarty -> assign ( 'DEBUG_VAR' , $ debugVar ) ; if ( $ displayTrace ) { $ smarty -> assign ( 'STACK_TRACE' , $ debugTrace ) ; } $ smarty -> display ( 'string:' . @ file_get_contents ( 'webroot/Errors/tpls/debugTrace.htpl' ) ) ; if ( $ exit ) { exit ( ) ; } }
Prints variable formatted structure and value of variable
 @param mixed $var
 @param bool $exit
 @param bool $displayTrace
Prints variable formatted structure and value of variable @param mixed $var @param bool $exit @param bool $displayTrace