getPublicContainer example

class TestContainer extends Container
{
    public function __construct(
        private KernelInterface $kernel,
        private string $privateServicesLocatorId,
        private array $renamedIds = [],
    ) {
    }

    public function compile(): void
    {
        $this->getPublicContainer()->compile();
    }

    public function isCompiled(): bool
    {
        return $this->getPublicContainer()->isCompiled();
    }

    public function getParameterBag(): ParameterBagInterface
    {
        return $this->getPublicContainer()->getParameterBag();
    }

    
Home | Imprint | This part of the site doesn't use cookies.