childContainers = $childContainers; } public function get(string $id) { foreach ($this->childContainers as $childContainer) { if ($childContainer->has($id)) { return $childContainer->get($id); } } throw new \InvalidArgumentException('Service id is unknown: ' . $id); } public function has(string $id) { foreach ($this->childContainers as $childContainer) { if ($childContainer->has($id)) { return true; } } return false; } }