You are here

InitSubscriber.php in Lightweight Directory Access Protocol (LDAP) 8.3

File

ldap_user/src/EventSubscriber/InitSubscriber.php
View source
<?php

namespace Drupal\ldap_user\EventSubscriber;

use Drupal\ldap_user\Helper\SemaphoreStorage;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

/**
 * Subscriber for the semaphore storage.
 */
class InitSubscriber implements EventSubscriberInterface {

  /**
   * {@inheritdoc}
   */
  public static function getSubscribedEvents() {
    return [
      KernelEvents::REQUEST => [
        'onEvent',
        0,
      ],
    ];
  }

  /**
   * {@inheritdoc}
   */
  public function onEvent() {

    // Reset for simpletest page load behavior.
    SemaphoreStorage::flushAllValues();
  }

}

Classes

Namesort descending Description
InitSubscriber Subscriber for the semaphore storage.