ReflectionClass::resetAsLazyProxy
(PHP 8 >= 8.4.0)
Resets an object and marks it as lazy
Description
The behavior of this method is the same as ReflectionClass::resetAsLazyGhost except that it uses the proxy strategy.
The object itself becomes the proxy. Similarly to ReflectionClass::resetAsLazyGhost, the object is not replaced by an other one, and its identity does not change, even after initialization. The proxy and the real instance are distinct objects, with distinct identities.
Parameters
objectA non-lazy object, or an initialized lazy object.
factoryAn factory callback with the same signature and purpose as in
ReflectionClass::newLazyProxy.
Return Values
Void
See Also
ReflectionClass::newLazyProxyReflectionClass::resetAsLazyGhost