class DatabaseEvent

Same name in other branches
  1. 10 core/lib/Drupal/Core/Database/Event/DatabaseEvent.php \Drupal\Core\Database\Event\DatabaseEvent

Represents a database event.

Hierarchy

  • class \Drupal\Component\EventDispatcher\Event extends \Symfony\Contracts\EventDispatcher\Event
    • class \Drupal\Core\Database\Event\DatabaseEvent extends \Drupal\Component\EventDispatcher\Event

Expanded class hierarchy of DatabaseEvent

4 files declare their use of DatabaseEvent
Connection.php in core/lib/Drupal/Core/Database/Connection.php
DatabaseEventsTest.php in core/tests/Drupal/Tests/Core/Database/DatabaseEventsTest.php
PerformanceDataCollector.php in core/modules/system/tests/modules/performance_test/src/PerformanceDataCollector.php
PerformanceTestTrait.php in core/tests/Drupal/Tests/PerformanceTestTrait.php

File

core/lib/Drupal/Core/Database/Event/DatabaseEvent.php, line 10

Namespace

Drupal\Core\Database\Event
View source
abstract class DatabaseEvent extends Event {
    
    /**
     * The time of the event.
     */
    public readonly float $time;
    
    /**
     * Constructs a DatabaseEvent object.
     */
    public function __construct() {
        $this->time = microtime(TRUE);
    }

}

Members

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

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