You are here

final class DeterminingServerFeaturesEvent in Search API 8

Wraps a determining server features event.

Hierarchy

Expanded class hierarchy of DeterminingServerFeaturesEvent

2 files declare their use of DeterminingServerFeaturesEvent
EventListener.php in tests/search_api_test_events/src/EventListener.php
Server.php in src/Entity/Server.php

File

src/Event/DeterminingServerFeaturesEvent.php, line 11

Namespace

Drupal\search_api\Event
View source
final class DeterminingServerFeaturesEvent extends Event {

  /**
   * Reference to the features supported by the server's backend.
   *
   * @var array
   */
  protected $features;

  /**
   * The search server in question.
   *
   * @var \Drupal\search_api\ServerInterface
   */
  protected $server;

  /**
   * Constructs a new class instance.
   *
   * @param array $features
   *   Reference to the features supported by the server's backend.
   * @param \Drupal\search_api\ServerInterface $server
   *   The search server in question.
   */
  public function __construct(array &$features, ServerInterface $server) {
    $this->features =& $features;
    $this->server = $server;
  }

  /**
   * Retrieves a reference to the features supported by the server's backend.
   *
   * @return array
   *   Reference to the features supported by the server's backend.
   */
  public function &getFeatures() {
    return $this->features;
  }

  /**
   * Retrieves the search server in question.
   *
   * @return \Drupal\search_api\ServerInterface
   *   The search server in question.
   */
  public function getServer() {
    return $this->server;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DeterminingServerFeaturesEvent::$features protected property Reference to the features supported by the server's backend.
DeterminingServerFeaturesEvent::$server protected property The search server in question.
DeterminingServerFeaturesEvent::getFeatures public function Retrieves a reference to the features supported by the server's backend.
DeterminingServerFeaturesEvent::getServer public function Retrieves the search server in question.
DeterminingServerFeaturesEvent::__construct public function Constructs a new class instance.