public function KernelDestructionSubscriber::registerService

Registers a service for destruction.

Calls to this method are set up in RegisterServicesForDestructionPass::process().

Parameters

string $id: Name of the service.

File

drupal/core/lib/Drupal/Core/EventSubscriber/KernelDestructionSubscriber.php, line 36
Contains \Drupal\Core\EventSubscriber\KernelDestructionSubscriber.

Class

KernelDestructionSubscriber
Destructs services that are initiated and tagged with "needs_destruction".

Namespace

Drupal\Core\EventSubscriber

Code

public function registerService($id) {
  $this->services[] = $id;
}