Documentation

LazyProxyTrait uses \Symfony\Component\VarExporter\Internal\LazyObjectTrait

since Symfony 7.3, use native lazy objects instead

Table of Contents

Methods

__clone()  : void
__destruct()  : mixed
__get()  : mixed
__isset()  : bool
__serialize()  : array<string|int, mixed>
__set()  : void
__unserialize()  : void
__unset()  : void
createLazyProxy()  : static
Creates a lazy-loading virtual proxy.
initializeLazyObject()  : parent
Forces initialization of a lazy object and returns it.
isLazyObjectInitialized()  : bool
Returns whether the object is initialized.
resetLazyObject()  : bool

Methods

__get()

public & __get(mixed $name) : mixed
Parameters
$name : mixed

__isset()

public __isset(mixed $name) : bool
Parameters
$name : mixed
Return values
bool

__serialize()

public __serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

__set()

public __set(mixed $name, mixed $value) : void
Parameters
$name : mixed
$value : mixed

__unserialize()

public __unserialize(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>

__unset()

public __unset(mixed $name) : void
Parameters
$name : mixed

createLazyProxy()

Creates a lazy-loading virtual proxy.

public static createLazyProxy(callable(): object $initializer[, static|null $instance = null ]) : static
Parameters
$initializer : callable(): object

Returns the proxied object

$instance : static|null = null
Return values
static

initializeLazyObject()

Forces initialization of a lazy object and returns it.

public initializeLazyObject() : parent
Return values
parent

isLazyObjectInitialized()

Returns whether the object is initialized.

public isLazyObjectInitialized([bool $partial = false ]) : bool
Parameters
$partial : bool = false

Whether partially initialized objects should be considered as initialized

Attributes
#[Ignore]
Return values
bool

resetLazyObject()

public resetLazyObject() : bool
Return values
bool

Returns false when the object cannot be reset, ie when it's not a lazy object


        
On this page

Search results