GrumPHP\Console\Application::getContainer PHP Method

getContainer() protected method

protected getContainer ( ) : ContainerBuilder
return Symfony\Component\DependencyInjection\ContainerBuilder
    protected function getContainer()
    {
        if ($this->container) {
            return $this->container;
        }
        // Load cli options:
        $input = new ArgvInput();
        $configPath = $input->getParameterOption(['--config', '-c'], $this->getDefaultConfigPath());
        // Build the service container:
        $this->container = ContainerFactory::buildFromConfiguration($configPath);
        return $this->container;
    }