KernelDestructionSubscriber
class KernelDestructionSubscriber implements EventSubscriberInterface, ContainerAwareInterface (View source)
Destructs services that are initiated and tagged with "needs_destruction".
Traits
ContainerAwareTrait
Properties
| protected array | $services | Holds an array of service ID's that will require destruction. |
Methods
registerService(string $id)
Registers a service for destruction.
onKernelTerminate(TerminateEvent $event)
Invoked by the terminate kernel event.
static array
getSubscribedEvents()
Registers the methods in this class that should be listeners.
Details
registerService(string $id)
Registers a service for destruction.
Calls to this method are set up in RegisterServicesForDestructionPass::process().
onKernelTerminate(TerminateEvent $event)
Invoked by the terminate kernel event.
static array
getSubscribedEvents()
Registers the methods in this class that should be listeners.