|
ReflectionClass::resetAsLazyGhostResets an object and marks it as lazy Description
public void ReflectionClass::resetAsLazyGhost(object
$object , callable $initializer , int $options = 0)
Resets an existing
The object's destructor is called (if one exists) unless the
Dynamic properties are removed, and the value of properties declared on the
class is discarded as though unset was called, and
marked as lazy. This implies that if the object is an instance of a subclass
with additional properties, these properties are not modified and not made
lazy.
Readonly
properties are also not modified and not made lazy if they are
If no properties was marked lazy, the object is is not marked as lazy. See also Lazy Objects Lifecycle. Otherwise, after calling this method, the behavior of the object is the same as an object created by ReflectionClass::newLazyGhost (except for subclass and readonly properties, as described above).
The object is not replaced by an other one, and its identity remains
unchanged. Functionality such as spl_object_id,
spl_object_hash,
SplObjectStorage, WeakMap,
WeakReference, or
the identity operator
( Parameters
Return ValuesNo value is returned. Errors/ExceptionsA ReflectionException if the object is lazy and non-initialized.
An Error if the object is being initialized, or if the
object properties are being iterated with
See Also
|