mini\Util\IdentityMap::tryGet() Method

public

Signature

public function tryGet(string|int $id): ?object

Parameters

Name Type Default Description
$id string|int required Documentation missing

Returns

?object

Documentation

Try to retrieve an object by its identifier

Returns the object if it exists and hasn't been garbage collected, or null if the object doesn't exist or has been garbage collected.

Dead weak references are automatically cleaned up when encountered.

Source

src/Util/IdentityMap.php:107-119