createInstance()
createInstance(string $className,mixed $args = null): mixed
Creates a new instance of the specified class name.
Parameters
string | $className | the fully qualified class name |
mixed | $args | a variable number of arguments to pass to the class constructor |
Throws
- \ReflectionException
if the object instance could not be created
Returns
mixed —the created object instance