本文整理汇总了PHP中wfFormatStackFrame函数的典型用法代码示例。如果您正苦于以下问题:PHP wfFormatStackFrame函数的具体用法?PHP wfFormatStackFrame怎么用?PHP wfFormatStackFrame使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wfFormatStackFrame函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wfGetCaller
/**
* Get the name of the function which called this function
* wfGetCaller( 1 ) is the function with the wfGetCaller() call (ie. __FUNCTION__)
* wfGetCaller( 2 ) [default] is the caller of the function running wfGetCaller()
* wfGetCaller( 3 ) is the parent of that.
*
* @param int $level
* @return string
*/
function wfGetCaller($level = 2)
{
$backtrace = wfDebugBacktrace($level + 1);
if (isset($backtrace[$level])) {
return wfFormatStackFrame($backtrace[$level]);
} else {
return 'unknown';
}
}
示例2: markTestSkipped
/**
* Mark this test as skipped. Puts extra information in the logs.
*
* @param string $message
*/
public static function markTestSkipped($message = '')
{
$backtrace = wfDebugBacktrace(3);
$entry = $backtrace[1];
Wikia::log(wfFormatStackFrame($entry), false, "marked as skipped - {$message}");
parent::markTestSkipped($message);
}