initializeBundles() protected method

- 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 ( )
Beispiel #1
0
 /**
  * {@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);
 }
Beispiel #3
0
 /**
  * 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];
         }
     }
 }
Beispiel #4
0
 public function initializeBundles()
 {
     parent::initializeBundles();
 }
 protected function initializeBundles()
 {
     parent::initializeBundles();
     $this->bundles['App'] = $bundle = $this->getAppBundle();
     $this->bundleMap['App'] = array($bundle);
 }