*/ final class Instantiator { /** * Creates an object and sets its properties without calling its constructor nor any other methods. * * @see Hydrator::hydrate() for examples * * @template T of object * * @param class-string $class The class of the instance to create * @param array $properties The properties to set on the instance * @param array> $scopedProperties The properties to set on the instance, * keyed by their declaring class * * @return T * * @throws ExceptionInterface When the instance cannot be created */ public static function instantiate(string $class, array $properties = [], array $scopedProperties = []): object { $reflector = Registry::$reflectors[$class] ??= Registry::getClassReflector($class); if (Registry::$cloneable[$class]) { $instance = clone Registry::$prototypes[$class]; } elseif (Registry::$instantiableWithoutConstructor[$class]) { $instance = $reflector->newInstanceWithoutConstructor(); } elseif (null === Registry::$prototypes[$class]) { throw new NotInstantiableTypeException($class); } elseif ($reflector->implementsInterface('Serializable') && !method_exists($class, '__unserialize')) { $instance = unserialize('C:'.\strlen($class).':"'.$class.'":0:{}'); } else { $instance = unserialize('O:'.\strlen($class).':"'.$class.'":0:{}'); } return $properties || $scopedProperties ? Hydrator::hydrate($instance, $properties, $scopedProperties) : $instance; } } __halt_compiler();----SIGNATURE:----JtSH32QD7AYQgNwkU7TW0G29PyEYxjv+NjNtT2qPaiVILLdceKw7a3r+pRtYnmGvOuYdFPZkfzQez6qKW0271DQRt2ZWemo0OKL9DnwWhZDGJs/ClJbK4WDe9fji921U52jWjKBgpcG91xYk1nSUA72CIEkiXi/c0BGl174ALgZVwQA0+aMeW6NKf1uRDM/3bvsk8xnsjFvRcIjMUtxsLQqwGVkas5sZGA4IsS9F9RcoHlwFyn+xW1QmQts9yS6bH9Z/fP25LYuoKVd0LCtDK/QxiJPE91b44uINNniYaeJLd5mDlnkxfPLM5j8E15IOehdvQf4/KeO5hgmfHMiJQZEdyk6ZIVj6+GZDnU+fbYxSXuBabJSjXx/pCqZ7kUIiIVcV9DxARlseNYIGDEaXOUnvpbIJp1Y2H2Cbgc95h33/uw8RnpH2MYgT/3bjD2hHNm1jUxboez3qukvPbNoU8qGXyEXeDH3ApcK4SrWvafNwc3WwMFH2gUctVt0SpxgAvY39Y/LMxzx/QjZ9moRFiwwenPuffepU0iSyOJhnqtv5cd41ifvu9iyqE5EAVY9RFQM5lkX7Iyc+ivn26dhkyrfWI3oMfOYQ+mXCQ4D5xA5UqHMV7fdaZ+EipQHyDv3AOG00+QUnZ11+0nJjOBsMjZRi+Vw2FynM8+9KMRJLDE8=----ATTACHMENT:----MjAzMzA1NDgzNTEzODAyMCAxNjIwODY2Mjg4ODY3MjUzIDY0NzA5MzAxOTU3NzA3MDk=