Add Support::getCallStack

returns full call stack for call (excluding self)
This commit is contained in:
Clemens Schwaighofer
2023-10-23 16:59:14 +09:00
parent 6517747fef
commit 7b9a0043d3
4 changed files with 67 additions and 8 deletions

View File

@@ -470,7 +470,7 @@ function intervalStringFormatDeprecated(
// on first hit turn off (full off)
if ($value) {
$skip_last_zero = null;
} elseif (!$value && $skip_last_zero === false) {
} elseif ($skip_last_zero === false) {
$zero_last_list[] = $part;
}
// build format

View File

@@ -170,6 +170,8 @@ class TestL
{
print "* GETCALLERCLASS(INSIDE CLASS): " . \CoreLibs\Debug\Support::getCallerClass() . "<br>";
print "* GETCALLERTOPCLASS(INSIDE CLASS): " . \CoreLibs\Debug\Support::getCallerTopLevelClass() . "<br>";
print "* GETCALLSTACK(INSIDE CLASS): <pre>"
. DebugSupport::prAr(\CoreLibs\Debug\Support::getCallStack()) . "</pre><br>";
$this->log->debug('TESTL', 'Logging in class testL' . ($ts !== null ? ': ' . $ts : ''));
$this->log->debug('TESTL', 'Some other message');
return true;
@@ -193,6 +195,8 @@ class TestR extends TestL
{
print "** GETCALLERCLASS(INSIDE EXTND CLASS): " . \CoreLibs\Debug\Support::getCallerClass() . "<br>";
print "** GETCALLERTOPCLASS(INSIDE EXTND CLASS): " . \CoreLibs\Debug\Support::getCallerTopLevelClass() . "<br>";
print "** GETCALLSTACK(INSIDE EXTND CLASS): <pre>"
. DebugSupport::prAr(\CoreLibs\Debug\Support::getCallStack()) . "</pre><br>";
$this->log->debug('TESTR', 'Logging in class testR (extends testL)');
$this->test('TESTR INSIDE');
$this->log->debug('TESTR', 'Array: '