You are here

class EnsureEvent in Flysystem 8

Same name and namespace in other branches
  1. 3.x src/Event/EnsureEvent.php \Drupal\flysystem\Event\EnsureEvent
  2. 2.0.x src/Event/EnsureEvent.php \Drupal\flysystem\Event\EnsureEvent
  3. 3.0.x src/Event/EnsureEvent.php \Drupal\flysystem\Event\EnsureEvent

The event fired for every result from an ensure() call.

Hierarchy

  • class \Drupal\flysystem\Event\EnsureEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of EnsureEvent

4 files declare their use of EnsureEvent
EnsureEventTest.php in tests/src/Unit/Event/EnsureEventTest.php
EnsureSubscriber.php in src/EventSubscriber/EnsureSubscriber.php
EnsureSubscriberTest.php in tests/src/Unit/EventSubscriber/EnsureSubscriberTest.php
FlysystemFactory.php in src/FlysystemFactory.php

File

src/Event/EnsureEvent.php, line 10

Namespace

Drupal\flysystem\Event
View source
class EnsureEvent extends Event {

  /**
   * The log context.
   *
   * @var array
   */
  protected $context;

  /**
   * The log message.
   *
   * @var string
   */
  protected $message;

  /**
   * The scheme of the item being logged.
   *
   * @var string
   */
  protected $scheme;

  /**
   * The severity of the message being logged.
   *
   * @var int
   */
  protected $severity;

  /**
   * Constructs an EnsureEvent object.
   *
   * @param string $scheme
   *   The scheme.
   * @param int $severity
   *   The severity.
   * @param string $message
   *   The message.
   * @param array $context
   *   The context for the message.
   */
  public function __construct($scheme, $severity, $message, array $context) {
    $this->scheme = $scheme;
    $this->severity = $severity;
    $this->message = $message;
    $this->context = $context;
  }

  /**
   * Returns the context.
   *
   * @return array
   */
  public function getContext() {
    return $this->context;
  }

  /**
   * Returns the message.
   *
   * @return string
   */
  public function getMessage() {
    return $this->message;
  }

  /**
   * Returns the scheme.
   *
   * @return string
   */
  public function getScheme() {
    return $this->scheme;
  }

  /**
   * Returns the severity.
   *
   * @return int
   */
  public function getSeverity() {
    return $this->severity;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EnsureEvent::$context protected property The log context.
EnsureEvent::$message protected property The log message.
EnsureEvent::$scheme protected property The scheme of the item being logged.
EnsureEvent::$severity protected property The severity of the message being logged.
EnsureEvent::getContext public function Returns the context.
EnsureEvent::getMessage public function Returns the message.
EnsureEvent::getScheme public function Returns the scheme.
EnsureEvent::getSeverity public function Returns the severity.
EnsureEvent::__construct public function Constructs an EnsureEvent object.