InjectionCreator
class InjectionCreator implements Factory (View source)
A class for creating new objects by the injector.
Methods
Details
object
create(string|object $class, array $params = [])
Create a new instance of a class
Passing an object for $class will result from using an anonymous class in unit testing, e.g. Injector::inst()->load([SomeClass::class => ['class' => new class { ... }]]);