MediaWiki  1.34.0
Wikimedia\Services\DestructibleService Interface Reference

DestructibleService defines a standard interface for shutting down a service instance. More...

Inheritance diagram for Wikimedia\Services\DestructibleService:

Public Member Functions

 destroy ()
 Notifies the service object that it should expect to no longer be used, and should release any system resources it may own. More...
 

Detailed Description

DestructibleService defines a standard interface for shutting down a service instance.

The intended use is for a service container to be able to shut down services that should no longer be used, and allow such services to release any system resources.

Note
There is no expectation that services will be destroyed when the process (or web request) terminates.

Definition at line 36 of file DestructibleService.php.

Member Function Documentation

◆ destroy()

Wikimedia\Services\DestructibleService::destroy ( )

Notifies the service object that it should expect to no longer be used, and should release any system resources it may own.

The behavior of all service methods becomes undefined after destroy() has been called. It is recommended that implementing classes should throw an exception when service methods are accessed after destroy() has been called.

Implemented in Wikimedia\Services\ServiceContainer.


The documentation for this interface was generated from the following file: