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

Breadcrumb

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

function EventDriver::__construct

Overrides AbstractDriver::__construct

File

vendor/revolt/event-loop/src/EventLoop/Driver/EventDriver.php, line 37

Class

EventDriver

Namespace

Revolt\EventLoop\Driver

Code

public function __construct() {
    parent::__construct();
    
    /** @psalm-suppress TooFewArguments https://github.com/JetBrains/phpstorm-stubs/pull/763 */
    $this->handle = new \EventBase();
    if (self::$activeSignals === null) {
        self::$activeSignals =& $this->signals;
    }
    $this->ioCallback = function ($resource, $what, StreamCallback $callback) : void {
        $this->enqueueCallback($callback);
    };
    $this->timerCallback = function ($resource, $what, TimerCallback $callback) : void {
        $this->enqueueCallback($callback);
    };
    $this->signalCallback = function ($signo, $what, SignalCallback $callback) : void {
        $this->enqueueCallback($callback);
    };
}
RSS feed
Powered by Drupal