legacyContainer = $legacyContainer ?? new LegacyServiceGateway(); } /** * @inheritDoc */ public function get($id, int $invalidBehavior = 1) { try { return parent::get($id, $invalidBehavior); } catch (ServiceNotFoundException $exception) { return $this->legacyContainer->get($id); } } /** * @inheritDoc */ public function has($id) { return parent::has($id) || $this->legacyContainer->has($id); } }