/**
  * @return Container
  */
 private function _buildContainer()
 {
     $this->_generatorConfig->addCompilerPass($this->_storeConfigCompilerPass);
     $this->_generatorConfig->addCompilerPass($this->_injectableCompilerPass);
     $generator = new ContainerGenerator($this->_generatorConfig);
     return $this->_container = $generator->getContainer();
 }
 /**
  * @return Container
  */
 private function _buildContainer()
 {
     $this->_generatorConfig->addCompilerPass($this->_storeConfigCompilerPass);
     $this->_generatorConfig->addCompilerPass($this->_injectableCompilerPass);
     $this->_mageApp->dispatchEvent('symfony_container_before_container_generator', ['generator_config' => $this->_generatorConfig]);
     $generator = new ContainerGenerator($this->_generatorConfig);
     return $this->_container = $generator->getContainer();
 }
 /**
  * @When I generate the container
  */
 public function iGenerateTheContainer()
 {
     $container = new ContainerGenerator($this->configuration);
     try {
         $this->generatedContainer = $container->getContainer();
     } catch (Exception $e) {
         $this->generatorException = $e;
     }
 }
 /**
  * @return Container
  */
 private function _buildContainer()
 {
     $this->_generatorConfig->addCompilerPass(new Inviqa_SymfonyContainer_Model_ExampleCompilerPass());
     $generator = new ContainerGenerator($this->_generatorConfig);
     return $this->_container = $generator->getContainer();
 }
<?php

require_once 'vendor/autoload.php';
use ContainerTools\ContainerGenerator;
use ContainerTools\Configuration;
$configFolders = preg_split('/,/', $argv[1]);
$isDebug = $argv[2] == 'true';
$isTest = $argv[3] == 'true';
$config = Configuration::fromParameters('./container.cache.php', $configFolders, $isDebug, 'xml');
$config->setTestEnvironment($isTest);
$container = new ContainerGenerator($config);
$container->getContainer();
include_once 'container.cache.php';
$container = new ProjectServiceContainer();
file_put_contents('serialized.container', serialize($container->getServiceIds()));