name: Instantiator class_comment: null dependencies: - name: ExceptionInterface type: class source: Symfony\Component\VarExporter\Exception\ExceptionInterface - name: NotInstantiableTypeException type: class source: Symfony\Component\VarExporter\Exception\NotInstantiableTypeException - name: Registry type: class source: Symfony\Component\VarExporter\Internal\Registry properties: [] methods: - name: instantiate visibility: public parameters: - name: class - name: properties default: '[]' - name: scopedProperties default: '[]' comment: '# * A utility class to create objects without calling their constructor. # * # * @author Nicolas Grekas # */ # 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' traits: - Symfony\Component\VarExporter\Exception\ExceptionInterface - Symfony\Component\VarExporter\Exception\NotInstantiableTypeException - Symfony\Component\VarExporter\Internal\Registry interfaces: []