コード例 #1
0
ファイル: InjectorImpl.php プロジェクト: spotframework/spot
 /**
  * @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);
 }
コード例 #2
0
ファイル: FactoryFactory.php プロジェクト: spotframework/spot
 public function fork(Modules $modules, Bindings $bindings, LinkedSingletons $singletons)
 {
     return FactoryFactory::create($modules, $bindings, $singletons, $this->storage, $this->reflection);
 }