MAKS\AmqpAgent\Helper\Utility::backtrace
Returns the passed key(s) from the backtrace. Note that the backtrace is reversed (last is first).
Signature
public function backtrace(string|array
$pluck,
[integer
$offset = 0] )
Parameters
$pluck
—
object
- The key to to get as a string or an array of strings (keys) from this list [file, line, function, class, type, args].
$offset
—
integer
- [optional] The offset of the backtrace (last executed is index at 0).
Returns
- string|int|array|null
- A string or int if a string is passed, an array if an array is passed and null if no match was found.
Test Coverage
Information
- Coverage: 11/11 Lines (100%)
- Tests: 11
- Passed: 11 (100%)
Tests
- [ PASSED ] — MAKS\AmqpAgent\Tests\Exception\AmqpAgentExceptionTest::testAmqpAgentExceptionRethrow
- [ PASSED ] — MAKS\AmqpAgent\Tests\Exception\AmqpAgentExceptionTest::testAmqpAgentExceptionRethrowViaAliasMethod
- [ PASSED ] — MAKS\AmqpAgent\Tests\Exception\AmqpAgentExceptionTest::testAmqpAgentExceptionRethrowStringWrapParameter
- [ PASSED ] — MAKS\AmqpAgent\Tests\Exception\AmqpAgentExceptionTest::testAmqpAgentExceptionRethrowBooleanWrapParameter
- [ PASSED ] — MAKS\AmqpAgent\Tests\Helper\UtilityTest::testBacktrackPluckAsString
- [ PASSED ] — MAKS\AmqpAgent\Tests\Helper\UtilityTest::testBacktrackPluckAsArray
- [ PASSED ] — MAKS\AmqpAgent\Tests\Helper\UtilityTest::testBacktrackReturnsNullOnOutOfBoundsOffset
- [ PASSED ] — MAKS\AmqpAgent\Tests\Helper\LoggerTest::testStaticCallingAndInsufficientCalling
- [ PASSED ] — MAKS\AmqpAgent\Tests\Worker\PublisherTest::testWorkRaisesAnExceptionIfUnexpectedParameterIsPassed
- [ PASSED ] — MAKS\AmqpAgent\Tests\Worker\ConsumerTest::testWorkRaisesAnExceptionIfUnexpectedParameterIsPassed
- [ PASSED ] — MAKS\AmqpAgent\Tests\RPC\AbstractEndpointTest::testPingMethodRaisesAnExceptionIfAnErrorOccurred