class InjectionCreator implements Factory (View source)

A class for creating new objects by the injector.

Methods

public
object|null
create(string $class, array $params = [])

Create a new instance of a class

Details

object|null create(string $class, array $params = [])

Create a new instance of a class

Parameters

string $class
  • string: The FQCN of the class, object: A class instance
array $params

The constructor parameters.

Return Value

object|null

The created service instances.