Serializor\ClosureStasis final class

Documentation

Stasis for anonymous closures with source code extraction.

Inheritance

Extends: Serializor\Stasis

Properties (14)

private string $file
private int $line
private string $code
private string $namespace
private ?string $scope
private ?object $this
private array $use
private bool $isStatic
private array $useStatements
private static array $codeMakers
private static array $functionCache
private static array $fileInfoCache

Pre-processed file info cache.

protected static ?WeakMap $results

WeakMap for caching resolved instances to preserve object identity.

public array $whenResolvedListeners

Methods (26)

Documentation missing

Documentation missing

Documentation missing

Documentation missing

Simple if no captured variables or bound $this.

Get the use variables for transformation.

Get the bound $this for transformation.

Set the bound $this (after transformation).

Documentation missing

Documentation missing

Documentation missing

Documentation missing

Documentation missing

public static from()
inherited from Serializor\Stasis

Create the appropriate Stasis subclass for the given value.

public static registerFactory()
inherited from Serializor\Stasis

Register a custom factory for handling user-defined types.

public whenResolved()
inherited from Serializor\Stasis

Add a callback to be invoked when this Stasis is resolved.

public setInstance()
inherited from Serializor\Stasis

Store the resolved instance and notify listeners.

public hasInstance()
inherited from Serializor\Stasis

Check if this Stasis has already been resolved.

protected getCachedInstance()
inherited from Serializor\Stasis

Get the cached instance if it exists.

protected static init()
inherited from Serializor\Stasis

Documentation missing

public static getObjectProperties()
inherited from Serializor\Stasis

Get object properties including private/protected from parent classes.

public static setObjectProperties()
inherited from Serializor\Stasis

Set object properties including private/protected from parent classes.

Source

src/ClosureStasis.php:15-709