ShutdownHandler
in package
FinalYes
Table of Contents
Properties
- $handlers : array<int, Closure>|null
- $ids : array<string|int, mixed>
- $weakMap : WeakMap<object, self>|null
Methods
- __destruct() : mixed
- register() : void
- Registers a function that will be executed on shutdown.
- __construct() : mixed
- registerShutdownFunction() : void
Properties
$handlers
private
static array<int, Closure>|null
$handlers
= null
$ids
private
array<string|int, mixed>
$ids
= []
$weakMap
private
static WeakMap<object, self>|null
$weakMap
= null
Methods
__destruct()
public
__destruct() : mixed
register()
Registers a function that will be executed on shutdown.
public
static register(callable $shutdownFunction) : void
If the given function is bound to an object, then the function will only be executed if the bound object is still referenced on shutdown handler invocation.
ShutdownHandler::register([$tracerProvider, 'shutdown']);
Parameters
- $shutdownFunction : callable
-
function to register
Tags
__construct()
private
__construct() : mixed
registerShutdownFunction()
private
static registerShutdownFunction() : void