You are here

interface DestructableInterface in Service Container 7.2

Same name and namespace in other branches
  1. 7 lib/Drupal/Core/DestructableInterface.php \Drupal\Core\DestructableInterface

The interface for services that need explicit destruction.

This is useful for services that need to perform additional tasks to finalize operations or clean up after the response is sent and before the service is terminated.

Services using this interface need to be registered with the "needs_destruction" tag.

Hierarchy

Expanded class hierarchy of DestructableInterface

All classes that implement DestructableInterface

2 files declare their use of DestructableInterface
DatabaseStorageExpirable.php in lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php
Contains \Drupal\Core\KeyValueStore\DatabaseStorageExpirable.
KeyValueDatabaseExpirableFactory.php in lib/Drupal/Core/KeyValueStore/KeyValueDatabaseExpirableFactory.php
Contains \Drupal\Core\KeyValueStore\KeyValueDatabaseExpirableFactory.

File

lib/Drupal/Core/DestructableInterface.php, line 20
Contains \Drupal\Core\DestructableInterface.

Namespace

Drupal\Core
View source
interface DestructableInterface {

  /**
   * Performs destruct operations.
   */
  public function destruct();

}

Members

Namesort descending Modifiers Type Description Overrides
DestructableInterface::destruct public function Performs destruct operations. 1