Dumps the service container to PHP code in the cache.
protected dumpContainer ( Symfony\Component\Config\ConfigCache $cache, |
||
$cache | Symfony\Component\Config\ConfigCache | The config cache |
$container | The service container | |
$class | string | The name of the class to generate |
$baseClass | string | The name of the container's base class |
protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container, $class, $baseClass) { parent::dumpContainer($cache, $container, $class, $baseClass); $data = array(); foreach ($this->zikulaBundles as $type => $bundles) { /* @var AbstractModule $bundle */ foreach ($bundles as $bundle) { $data[$bundle->getName()] = $bundle->getServiceIds(); } } $cache = new \Symfony\Component\Config\ConfigCache($this->getCacheDir() . '/' . $class . '.modules', $this->debug); $cache->write(serialize($data)); }
/** * {@inheritdoc} */ protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container, $class, $baseClass) { foreach ($this->getConfiguration()->getResources() as $resource) { $container->addResource($resource); } parent::dumpContainer($cache, $container, $class, $baseClass); }