DestructableInterface.php 489 Bytes
Newer Older
1 2 3 4 5 6
<?php

namespace Drupal\Core;

/**
 * The interface for services that need explicit destruction.
7 8 9 10 11 12 13
 *
 * 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.
14 15 16 17 18 19 20
 */
interface DestructableInterface {

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

22
}