function Connection::getDebugBacktrace

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::getDebugBacktrace()

Gets the debug backtrace.

Wraps the debug_backtrace function to allow mocking results in PHPUnit tests.

Return value

array[] The debug backtrace.

1 call to Connection::getDebugBacktrace()
Connection::findCallerFromDebugBacktrace in core/lib/Drupal/Core/Database/Connection.php
Determine the last non-database method that called the database API.

File

core/lib/Drupal/Core/Database/Connection.php, line 2232

Class

Connection
Base Database API class.

Namespace

Drupal\Core\Database

Code

protected function getDebugBacktrace() : array {
    // @todo: allow a backtrace including all arguments as an option.
    // See https://www.drupal.org/project/drupal/issues/3401906
    return debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.