lithium\core\ErrorHandler::trace()
Trim down a typical stack trace to class & method calls.
Parameters
-
array
$stack
A
debug_backtrace()
-compatible stack trace output.
Returns
arrayReturns a flat stack array containing class and method references.
Source
public static function trace(array $stack) {
$result = [];
foreach ($stack as $frame) {
if (isset($frame['function'])) {
if (isset($frame['class'])) {
$result[] = trim($frame['class'], '\\') . '::' . $frame['function'];
} else {
$result[] = $frame['function'];
}
}
}
return $result;
}