class StatementExecutionStartEvent

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Database/Event/StatementExecutionStartEvent.php \Drupal\Core\Database\Event\StatementExecutionStartEvent

Represents the start of a statement execution as an event.

Hierarchy

Expanded class hierarchy of StatementExecutionStartEvent

7 files declare their use of StatementExecutionStartEvent
DatabaseEventsTest.php in core/tests/Drupal/Tests/Core/Database/DatabaseEventsTest.php
DatabaseEventSubscriber.php in core/modules/system/tests/modules/database_test/src/EventSubscriber/DatabaseEventSubscriber.php
DatabaseEventTest.php in core/tests/Drupal/KernelTests/Core/Database/DatabaseEventTest.php
StatementPrefetch.php in core/lib/Drupal/Core/Database/StatementPrefetch.php
StatementPrefetchIterator.php in core/lib/Drupal/Core/Database/StatementPrefetchIterator.php

... See full list

File

core/lib/Drupal/Core/Database/Event/StatementExecutionStartEvent.php, line 8

Namespace

Drupal\Core\Database\Event
View source
class StatementExecutionStartEvent extends DatabaseEvent {
  
  /**
   * Constructs a StatementExecutionStartEvent object.
   *
   * See 'Customizing database settings' in settings.php for an explanation of
   * the $key and $target connection values.
   *
   * @param int $statementObjectId
   *   The id of the StatementInterface object as returned by spl_object_id().
   * @param string $key
   *   The database connection key.
   * @param string $target
   *   The database connection target.
   * @param string $queryString
   *   The SQL statement string being executed, with placeholders.
   * @param array $args
   *   The placeholders' replacement values.
   * @param array $caller
   *   A normalized debug backtrace entry representing the last non-db method
   *   called.
   */
  public function __construct(public readonly int $statementObjectId, public readonly string $key, public readonly string $target, public readonly string $queryString, public readonly array $args, public readonly array $caller) {
    parent::__construct();
  }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
DatabaseEvent::$time public property The time of the event.
StatementExecutionStartEvent::__construct public function Constructs a StatementExecutionStartEvent object. Overrides DatabaseEvent::__construct

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