Closable
in
Table of Contents
Methods
- close() : void
- Closes the resource, marking it as unusable.
- isClosed() : bool
- Returns whether this resource has been closed.
- onClose() : void
- Registers a callback that is invoked when this resource is closed.
Methods
close()
Closes the resource, marking it as unusable.
public
close() : void
Whether pending operations are aborted or not is implementation dependent.
isClosed()
Returns whether this resource has been closed.
public
isClosed() : bool
Return values
bool —true if closed, otherwise false.
onClose()
Registers a callback that is invoked when this resource is closed.
public
onClose(callable(): void $onClose) : void
Parameters
- $onClose : callable(): void