/**
  * print out type and content of the given variable if DEBUG-define (in config/core.php) > 0
  * @param mixed $var     Variable to debug
  */
 function debug($var = false)
 {
     if (DEBUG < 1) {
         return;
     }
     ob_start();
     if (function_exists('xdebug_var_dump')) {
         xdebug_var_dump($var);
     } else {
         var_dump($var);
     }
     $var = ob_get_clean();
     kataDebugOutput($var);
 }
 /**
  * destructor, outputs Total Render time if DEBUG>0
  */
 function __destruct()
 {
     if (DEBUG > 0) {
         kataDebugOutput('Total Render Time (including Models) ' . (microtime(true) - $this->starttime) . ' secs');
         kataDebugOutput('Memory used ' . number_format(memory_get_usage(true)) . ' bytes');
         kataDebugOutput('Parameters ' . print_R($this->params, true));
         if (function_exists('xdebug_get_profiler_filename')) {
             $fn = xdebug_get_profiler_filename();
             if (false !== $fn) {
                 kataDebugOutput('profilefile:' . $fn);
             }
         }
         kataDebugOutput('Loaded classes: ' . implode(' ', array_keys(classRegistry::getLoadedClasses())));
     }
 }
 /**
  * output any queries made, how long it took, the result and any errors if DEBUG>1
  */
 function __destruct()
 {
     if (DEBUG > 0) {
         array_unshift($this->queries, array('line', '', 'affected', 'error', 'time'));
         kataDebugOutput($this->queries, true);
     }
     if ($this->link) {
         unset($this->link);
     }
 }
 /**
  * output any queries made, how long it took, the result and any errors if DEBUG>1
  */
 function __destruct()
 {
     if (DEBUG > 0) {
         array_unshift($this->queries, array('line', '', 'affected', 'error', 'time'));
         kataDebugOutput($this->queries, true);
     }
     if ((bool) $this->link) {
         //sometimes the resource FNORDs
         if (is_resource($this->link) && get_resource_type($this->link) == 'mysql link') {
             mysql_close($this->link);
         }
         $this->link = null;
     }
 }
                        $count = $lines[$lineno + 1];
                    }
                    if ($count > 2) {
                        $count = 3;
                    }
                    echo '<tr>' . $tdCell . $lineno . '</td>' . $tdCell . '<tt';
                    switch ($count) {
                        case 0:
                            echo ' style="color:#c0c0c0;"';
                            break;
                        case 1:
                            echo '';
                            break;
                        case 2:
                        case 3:
                            echo ' style="color:#ffe0e0;"';
                            break;
                    }
                    echo '>' . h($line) . '</tt></td></tr>';
                }
                echo '</table>';
            }
            unset($lines);
            echo '</table>';
        }
        register_shutdown_function('kataCodeCoverage');
        xdebug_start_code_coverage();
    } else {
        kataDebugOutput('You need a current XDebug-Extension!');
    }
}
 /**
  * output debugging data if needed
  */
 function __destruct()
 {
     if (DEBUG > 0) {
         array_unshift($this->results, array('line', 'op', 'id', 'data', 'time'));
         kataDebugOutput($this->results, true);
     }
     unset($this->requestCache);
 }