diff --git a/dev/Debug.php b/dev/Debug.php index 58b7331d8..b1957966d 100644 --- a/dev/Debug.php +++ b/dev/Debug.php @@ -82,7 +82,17 @@ class Debug { } } - + + public static function caller() { + $bt = debug_backtrace(); + $caller = $bt[2]; + $caller['line'] = $bt[1]['line']; + $caller['file'] = $bt[1]['file']; + if(!isset($caller['class'])) $caller['class'] = ''; + if(!isset($caller['type'])) $caller['type'] = ''; + return $caller; + } + /** * Close out the show dumper *