interface Proxy implements Proxy (View source)

deprecated The Doctrine\Common\Proxy component is deprecated, please use ocramius/proxy-manager instead.

Interface for proxy classes.

Methods

void
__setInitialized(boolean $initialized)

Marks the proxy as initialized or not.

void
__setInitializer(Closure $initializer = null)

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.

Closure|null
__getInitializer()

Retrieves the initializer callback used to initialize the proxy.

void
__setCloner(Closure $cloner = null)

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

Closure|null
__getCloner()

Retrieves the callback to be used when cloning the proxy.

array
__getLazyProperties()

Retrieves the list of lazy loaded properties for a given proxy

Details

void __setInitialized(boolean $initialized)

Marks the proxy as initialized or not.

Parameters

boolean $initialized

Return Value

void

void __setInitializer(Closure $initializer = null)

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.

Parameters

Closure $initializer

Return Value

void

Closure|null __getInitializer()

Retrieves the initializer callback used to initialize the proxy.

Return Value

Closure|null

See also

__setInitializer

void __setCloner(Closure $cloner = null)

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

Parameters

Closure $cloner

Return Value

void

Closure|null __getCloner()

Retrieves the callback to be used when cloning the proxy.

Return Value

Closure|null

See also

__setCloner

array __getLazyProperties()

Retrieves the list of lazy loaded properties for a given proxy

Return Value

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