Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. EventLoop.php

function EventLoop::getDriver

Retrieve the event loop driver that is in scope.

Return value

Driver

File

vendor/revolt/event-loop/src/EventLoop.php, line 373

Class

EventLoop
Accessor to allow global access to the event loop.

Namespace

Revolt

Code

public static function getDriver() : Driver {
    
    /** @psalm-suppress RedundantPropertyInitializationCheck, RedundantCondition */
    if (!isset(self::$driver)) {
        self::setDriver((new DriverFactory())->create());
    }
    return self::$driver;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal