19declare(strict_types=1);
34 protected array $resolved_by = []
59 $this->dependant[(string)
$out] =
$out;
60 $out->addDependency($this);
65 if ($this->type !== InType::SEEK && count($this->resolved_by) > 0) {
66 throw new LogicException(
67 "Dependency of type {$this->type} can only be resolved once."
70 $this->resolved_by[] = $other;
76 return $this->resolved_by;
81 $this->resolved_by = [];
A dependency where the component needs something from the world.
addResolution(Out $other)
__construct(protected InType $type, string $name, protected array $resolved_by=[])
A dependency where the component gives something to the world.