Re-adding Debug::caller() which was inadvertently removed in 9eca2d6

This commit is contained in:
Sean Harvey 2012-11-15 14:56:43 +13:00
parent 8b0bb8dd09
commit 26a3c1cf4a

View File

@ -83,6 +83,16 @@ 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
*