Jarves\Configuration\Configs::loadBundles PHP Method

loadBundles() public method

public loadBundles ( array $bundles )
$bundles array
    public function loadBundles(array $bundles)
    {
        foreach ($bundles as $bundleName) {
            $bundle = $this->getJarves()->getBundle($bundleName);
            $configs = $this->getXmlConfigsForBundle($bundle);
            $this->configElements = array_merge($this->configElements, $configs);
        }
        $this->configElements = $this->parseConfig($this->configElements);
    }

Usage Example

コード例 #1
0
ファイル: Jarves.php プロジェクト: jarves/jarves
 /**
  * Returns a real Bundle config object, which is being read from the configurations
  * files without bootstrap. So this configuration does not contain any changes from
  * autoCrud, object-attributes, field modifications and other configuration manipulations from the bootstrap.
  *
  * When no configurations are found, it returns a completely new Jarves\Configuration\Bundle object.
  *
  * @param string $bundleName
  * @return Bundle
  */
 public function getRealConfig($bundleName)
 {
     $configs = new Configs($this);
     $configs->loadBundles([$bundleName]);
     $config = $configs->getConfig($bundleName);
     if (!$config) {
         $bundle = $this->getBundle($bundleName);
         return new Bundle($bundle, $this, null);
     }
     return $config;
 }