public static function createLazyProxy(\Closure
$initializer, object
$instance = null
):
static { if (self::
class !== $class =
$instance ?
$instance::
class D
static::
class) { $skippedProperties =
["\0".self::
class."\0lazyObjectState" => true
];
} elseif (\
defined($class.'::LAZY_OBJECT_PROPERTY_SCOPES'
)) { Hydrator::
$propertyScopes[$class] ??=
$class::LAZY_OBJECT_PROPERTY_SCOPES;
} $instance ??= (Registry::
$classReflectors[$class] ??=
new \
ReflectionClass($class))->
newInstanceWithoutConstructor();
$instance->lazyObjectState =
new LazyObjectState($initializer);
foreach (Registry::
$classResetters[$class] ??= Registry::
getClassResetters($class) as $reset) { $reset($instance,
$skippedProperties ??=
[]);
} return $instance;
} /**
* Returns whether the object is initialized.
*
* @param $partial Whether partially initialized objects should be considered as initialized
*/