You are here

interface IncidentInterface in Radioactivity 8.3

Same name and namespace in other branches
  1. 4.0.x src/IncidentInterface.php \Drupal\radioactivity\IncidentInterface

Defines the Radioactivity Incident.

Hierarchy

Expanded class hierarchy of IncidentInterface

All classes that implement IncidentInterface

4 files declare their use of IncidentInterface
DefaultIncidentStorageTest.php in tests/src/Unit/DefaultIncidentStorageTest.php
EmitControllerTest.php in tests/src/Unit/EmitControllerTest.php
RadioactivityProcessorTest.php in tests/src/Unit/RadioactivityProcessorTest.php
RestIncidentStorageTest.php in tests/src/Unit/RestIncidentStorageTest.php

File

src/IncidentInterface.php, line 8

Namespace

Drupal\radioactivity
View source
interface IncidentInterface {

  /**
   * Test validity of the Incident.
   *
   * @return bool
   *   True if the incident is valid. False if not.
   */
  public function isValid();

  /**
   * Convert to JSON format.
   *
   * @return string
   *   Json encoded incident data.
   */
  public function toJson();

  /**
   * Returns the incident field name.
   *
   * @return string
   *   The incident field name.
   */
  public function getFieldName();

  /**
   * Returns the incident entity type.
   *
   * @return string
   *   The incident entity type.
   */
  public function getEntityTypeId();

  /**
   * Returns the incident entity id.
   *
   * @return string|int
   *   The incident entity id.
   */
  public function getEntityId();

  /**
   * Returns the incident energy.
   *
   * @return int|float
   *   The incident energy.
   */
  public function getEnergy();

}

Members

Namesort descending Modifiers Type Description Overrides
IncidentInterface::getEnergy public function Returns the incident energy. 1
IncidentInterface::getEntityId public function Returns the incident entity id. 1
IncidentInterface::getEntityTypeId public function Returns the incident entity type. 1
IncidentInterface::getFieldName public function Returns the incident field name. 1
IncidentInterface::isValid public function Test validity of the Incident. 1
IncidentInterface::toJson public function Convert to JSON format. 1