Instantiator
in package
FinalYes
A utility class to create objects without calling their constructor.
Tags
Table of Contents
Methods
- instantiate() : T
- Creates an object and sets its properties without calling its constructor nor any other methods.
Methods
instantiate()
Creates an object and sets its properties without calling its constructor nor any other methods.
public
static instantiate(T> $class[, array<string, mixed> $properties = [] ][, array<class-string, array<string, mixed>> $scopedProperties = [] ]) : T
Parameters
- $class : T>
-
The class of the instance to create
- $properties : array<string, mixed> = []
-
The properties to set on the instance
- $scopedProperties : array<class-string, array<string, mixed>> = []
-
The properties to set on the instance, keyed by their declaring class