Jarves\Configuration\Configs::getConfig PHP Метод

getConfig() публичный Метод

public getConfig ( string $bundleName ) : Bundle
$bundleName string
Результат Bundle
    public function getConfig($bundleName)
    {
        $bundleName = $this->normalizeBundleName($bundleName);
        if (!isset($this->configElements[$bundleName]) && isset($this->configElements[$bundleName . 'bundle'])) {
            $bundleName .= 'bundle';
        }
        return isset($this->configElements[$bundleName]) ? $this->configElements[$bundleName] : null;
    }

Usage Example

Пример #1
0
 /**
  * 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;
 }