示例#1
0
 /**
  * Help debug method
  */
 public function help($level = null)
 {
     $vars = $this->_data->__var;
     unset($vars['__env']);
     unset($vars['app']);
     if ($level) {
         Debug::level($level);
     }
     ddd($vars);
 }
示例#2
0
 public static function predie()
 {
     $aArgs = func_get_args();
     $aErrors = debug_backtrace();
     $line = $file = null;
     foreach ($aErrors as $key => $error) {
         if (preg_match('/predie|ddd|dd|de/i', $error['function']) && !empty($error['line']) && !empty($error['file'])) {
             $line = $error['line'];
             $file = $error['file'];
             break;
         }
     }
     $start = ARX_STARTTIME;
     $time = microtime(true);
     $total_time = $time - $start;
     Debug::dump($aArgs);
     die("Predie called @ {$file} line {$line} loaded in " . $total_time . " seconds");
 }