コード例 #1
0
 public function resolve(Binding $binding)
 {
     if ($binding instanceof LateBinding) {
         return $this->bindings->get($binding->getKey());
     }
     return $binding;
 }
コード例 #2
0
 public function __construct()
 {
     parent::__construct(Key::ofType("Spot\\Inject\\Injector"));
 }
コード例 #3
0
ファイル: InlineBinding.php プロジェクト: spotframework/spot
 public function __construct(Type $type, array $dependencies)
 {
     parent::__construct(Key::ofType($type->name));
     $this->type = $type;
     $this->dependencies = $dependencies;
 }
コード例 #4
0
 public function __construct(Key $key, ConstantBinding $default)
 {
     parent::__construct($key);
     $this->default = $default;
 }
コード例 #5
0
ファイル: ConfigBinding.php プロジェクト: spotframework/spot
 public function __construct($name, $source)
 {
     parent::__construct(Key::ofConstant(Named::name($name)));
     $this->name = $name;
     $this->source = $source;
 }
コード例 #6
0
ファイル: Bindings.php プロジェクト: spotframework/spot
 public function put(Binding $binding)
 {
     $this->bindings[$binding->getKey()->hash()] = $binding;
 }