- the bundles property maps a bundle name to the bundle instance,
- the bundleMap property maps a bundle name to the bundle inheritance hierarchy (most derived bundle first).
protected initializeBundles ( ) |
/** * {@inheritdoc} */ protected function initializeBundles() { parent::initializeBundles(); // pass bundles to CumulativeResourceManager $bundles = array(); foreach ($this->bundles as $name => $bundle) { $bundles[$name] = get_class($bundle); } CumulativeResourceManager::getInstance()->setBundles($bundles)->setAppRootDir($this->rootDir); }
protected function initializeBundles() { parent::initializeBundles(); // pass bundles to BundleBag $bundles = array(); foreach ($this->bundles as $name => $bundle) { $bundles[$name] = get_class($bundle); } BundleBag::getInstance()->setBundles($bundles)->setAppRootDir($this->rootDir); }
/** * Initializes the data structures related to the bundle management. * * - the bundles property maps a bundle name to the bundle instance, * - the bundleMap property maps a bundle name to the bundle inheritance hierarchy (most derived bundle first). * * @throws \LogicException if two bundles share a common name * @throws \LogicException if a bundle tries to extend a non-registered bundle * @throws \LogicException if a bundle tries to extend itself * @throws \LogicException if two bundles extend the same ancestor */ protected function initializeBundles() { parent::initializeBundles(); foreach ($this->registerBundles() as $bundle) { if (\method_exists($bundle, "extendBundle")) { $name = $bundle->getName(); $extenBundle = $bundle->extendBundle(); $this->bundleMap[$name][] = $this->bundles[$extenBundle]; } } }
public function initializeBundles() { parent::initializeBundles(); }
protected function initializeBundles() { parent::initializeBundles(); $this->bundles['App'] = $bundle = $this->getAppBundle(); $this->bundleMap['App'] = array($bundle); }