Factory¶
-
class
Factory¶ Factory class
-
create($className, $args)¶ Create an object using constructor injection.
Parameters: - $className (string) – The FQN of the class to create.
- $args (array) – The required constructor arguments, in the order the constructor expects to receive them.
Returns: An instance of $className.
-