Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DestructableInterface.php

interface 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

  • interface \Drupal\Core\DestructableInterface

Expanded class hierarchy of DestructableInterface

All classes that implement DestructableInterface

5 files declare their use of DestructableInterface
CacheCollector.php in core/lib/Drupal/Core/Cache/CacheCollector.php
LocaleTranslation.php in core/modules/locale/src/LocaleTranslation.php
Registry.php in core/lib/Drupal/Core/Theme/Registry.php
RouteBuilder.php in core/lib/Drupal/Core/Routing/RouteBuilder.php
ThemeRegistry.php in core/lib/Drupal/Core/Utility/ThemeRegistry.php

File

core/lib/Drupal/Core/DestructableInterface.php, line 15

Namespace

Drupal\Core
View source
interface DestructableInterface {
    
    /**
     * Performs destruct operations.
     */
    public function destruct();

}

Members

Title Sort descending Modifiers Object type Summary Overrides
DestructableInterface::destruct public function Performs destruct operations. 6

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal