Documentation

VirtualProxyInterface extends LazyLoadingInterface, ValueHolderInterface

Virtual Proxy - a lazy initializing object wrapping around the proxied subject

Table of Contents

Methods

getProxyInitializer()  : Closure|null
getWrappedValueHolderValue()  : object|null
initializeProxy()  : bool
Force initialization of the proxy
isProxyInitialized()  : bool
Retrieves current initialization status of the proxy
setProxyInitializer()  : void
Set or unset the initializer for the proxy instance

Methods

getProxyInitializer()

public getProxyInitializer() : Closure|null
Tags
psalm-return

null|Closure( LazilyLoadedObjectType|null=, LazilyLoadedObjectType&LazyLoadingInterface<LazilyLoadedObjectType>=, string, array<string, mixed>=, ?Closure=, array<string, mixed>= ) : bool

Return values
Closure|null

getWrappedValueHolderValue()

public getWrappedValueHolderValue() : object|null
Tags
psalm-return

WrappedValueHolderType|null

Return values
object|null

the wrapped value

initializeProxy()

Force initialization of the proxy

public initializeProxy() : bool
Return values
bool

true if the proxy could be initialized

isProxyInitialized()

Retrieves current initialization status of the proxy

public isProxyInitialized() : bool
Return values
bool

setProxyInitializer()

Set or unset the initializer for the proxy instance

public setProxyInitializer([Closure|null $initializer = null ]) : void
Parameters
$initializer : Closure|null = null
Tags
link

An initializer should have a signature like following:

$initializer = function ( & ?object $wrappedObject, LazyLoadingInterface $proxy, string $calledMethod, array $callParameters, & ?\Closure $initializer, array $propertiesToBeSet = [] // works only on ghost objects ) };
psalm-param

null|Closure( LazilyLoadedObjectType|null=, LazilyLoadedObjectType&LazyLoadingInterface<LazilyLoadedObjectType>=, string=, array<string, mixed>=, ?Closure=, array<string, mixed>= ) : bool $initializer

Due to BC compliance, we cannot add a native : void return type declaration here

phpcs:disable SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint


        
On this page

Search results