/** * @param array $modules * @param Reflection $reflection * @param CodeStorage $storage * @param LoggerInterface $logger * @return Injector */ public static function create(array $modules, Reflection $reflection, CodeStorage $storage, LoggerInterface $logger) { $modules = new Modules($modules); $bindings = new Bindings(); $singletons = new Singletons(); $lazyGen = new LazyGenerator(); $lazy = new LazyFactory($reflection, $storage, $lazyGen); $factory = FactoryFactory::create($modules, $bindings, $singletons, $storage, $reflection); return new InjectorImpl($modules, $singletons, $factory, $lazy); }
public function fork(Modules $modules, Bindings $bindings, LinkedSingletons $singletons) { return FactoryFactory::create($modules, $bindings, $singletons, $this->storage, $this->reflection); }