legacyContainer = $legacyContainer; $this->cachePath = $cachePath; } public function getContainer(): ContainerInterface { if (!$this->container) { $this->container = $this->getContainerBuilder()->build(); } return $this->container; } public function getContainerBuilder(): ContainerBuilder { if (!$this->containerBuilder) { $this->containerBuilder = new ContainerBuilder( $this->cachePath, $this->legacyContainer ); } return $this->containerBuilder; } }