Documentation

Proxy extends Proxy

Interface for proxy classes.

Tags
deprecated
2.14.

Use \Doctrine\Persistence\Proxy instead

Table of Contents

Constants

MARKER  = '__CG__'
Marker for Proxy class names.
MARKER_LENGTH  = 6
Length of the proxy marker.

Methods

__getCloner()  : Closure|null
Retrieves the callback to be used when cloning the proxy.
__getInitializer()  : Closure|null
Retrieves the initializer callback used to initialize the proxy.
__getLazyProperties()  : array<string, mixed>
Retrieves the list of lazy loaded properties for a given proxy
__isInitialized()  : bool
Returns whether this proxy is initialized or not.
__load()  : void
Initializes this proxy if its not yet initialized.
__setCloner()  : void
Sets the callback to be used when cloning the proxy. That initializer should accept a single parameter, which is the cloned proxy instance itself.
__setInitialized()  : void
Marks the proxy as initialized or not.
__setInitializer()  : void
Sets the initializer callback to be used when initializing the proxy. That initializer should accept 3 parameters: $proxy, $method and $params. Those are respectively the proxy object that is being initialized, the method name that triggered initialization and the parameters passed to that method.

Constants

MARKER

Marker for Proxy class names.

public mixed MARKER = '__CG__'

MARKER_LENGTH

Length of the proxy marker.

public mixed MARKER_LENGTH = 6

Methods

__getCloner()

Retrieves the callback to be used when cloning the proxy.

public __getCloner() : Closure|null
Tags
see
__setCloner
Return values
Closure|null

__getInitializer()

Retrieves the initializer callback used to initialize the proxy.

public __getInitializer() : Closure|null
Tags
see
__setInitializer
Return values
Closure|null

__getLazyProperties()

Retrieves the list of lazy loaded properties for a given proxy

public __getLazyProperties() : array<string, mixed>
Return values
array<string, mixed>

Keys are the property names, and values are the default values for those properties.

__isInitialized()

Returns whether this proxy is initialized or not.

public __isInitialized() : bool
Return values
bool

__load()

Initializes this proxy if its not yet initialized.

public __load() : void

Acts as a no-op if already initialized.

__setCloner()

Sets the callback to be used when cloning the proxy. That initializer should accept a single parameter, which is the cloned proxy instance itself.

public __setCloner([Closure|null $cloner = null ]) : void
Parameters
$cloner : Closure|null = null

__setInitialized()

Marks the proxy as initialized or not.

public __setInitialized(bool $initialized) : void
Parameters
$initialized : bool

__setInitializer()

Sets the initializer callback to be used when initializing the proxy. That initializer should accept 3 parameters: $proxy, $method and $params. Those are respectively the proxy object that is being initialized, the method name that triggered initialization and the parameters passed to that method.

public __setInitializer([Closure|null $initializer = null ]) : void
Parameters
$initializer : Closure|null = null

        
On this page

Search results