Get the application's configuration as an object.

@throws \Exception if the configuration file cannot be read
@throws InvalidConfigException if config is invalid

@return AppConfig
554651
private function getConfigObject()
    {
        if (!isset($this->config)) {
            $config = [];
            $file = $this->appRoot . '/' . $this->cliConfig->get('service.app_config_file');
            if (file_exists($file)) {
                $config = (array) (new YamlParser())->parseFile($file);
            }
            $this->config = new AppConfig($config);
        }

        return $this->config;
    }
1009151
public function getConfiguration()
    {
        if (is_null($this->_configuration)) {
            $this->_configuration = Configuration::get('config');
        }
        return $this->_configuration;
    }
648628
protected function getConfig(Component $component)
    {
        if ($component->config === null) {
            if ($this->getDetector()->detect() === false) {
                throw new InvalidCallException('Unable to determine application type');
            }
            $configList = $this->getDetector()->getConfig();
        } else {
            if ($this->config === null) {
                if (isset($component->config[0])) {
                    $configList = $component->config;
                } else {
                    throw new InvalidCallException('Default config list not found in component config data');
                }
            } else {
                if (isset($component->config[$this->config])) {
                    $configList = $component->config[$this->config];
                } else {
                    throw new InvalidCallException(sprintf('Scope "%s" not found in component config data', $this->config));
                }
            }
        }
        return $configList;
    }
1137130
public function load()
    {
        $config = new UserConfiguration();
        if (!file_exists($this->storagePath)) {
            return $config;
        }

        try {
            $data = Yaml::parse(file_get_contents($this->storagePath));
        } catch (ParseException $e) {
            throw new ConfigException(sprintf('The config file "%s" is not a valid YAML.', $this->storagePath), 0, $e);
        }

        if (is_array($data)) {
            $config->load($data);
        }

        return $config;
    }
469123
public static function getConfig()
    {
        if (!is_object(self::$componentConfig)) {
            $config = [];

            // check if we have default config
            if (isset(self::$defaultConfig)) {
                $config = self::$defaultConfig;
            }
            self::$componentConfig = new ConfigObject($config);
        }

        return self::$componentConfig;
    }
644887
protected function getConfigs()
    {
    	if (!$configs = $this->container->getParameter($this->getRequest()->get('config_identifier', 'none'))){
            throw new \InvalidArgumentException('Configs does no exist!');
    	}
    	
    	return $configs;
    }
358002
public function getConfig()
    {
        $dir = $this->getDir();
    
        if (file_exists($dir . '/../../config/module.config.php')) {
            return include $dir . '/../../config/module.config.php';
        } elseif (file_exists($dir . '/config/module.config.php')) {
            return include $dir . '/config/module.config.php';
        } else {
            throw new \Exception('No module config found');
        }
    }
27502
public function getConfig()
    {
        $container = $this->getContainerBuilder();
        $this->defaults['scanDirs'] = $container->expand('%appDir%');

        return parent::getConfig($this->defaults);
    }
400454
public function getBuildFlavor()
    {
        $appConfig = $this->getConfig();
        if (!isset($appConfig['type'])) {
            throw new InvalidConfigException('Application configuration key not found: `type`');
        }

        $key = isset($appConfig['build']['flavor']) ? $appConfig['build']['flavor'] : 'default';
        list($stack, ) = explode(':', $appConfig['type'], 2);
        foreach (self::getBuildFlavors() as $candidate) {
            if (in_array($key, $candidate->getKeys())
                && ($candidate->getStacks() === [] || in_array($stack, $candidate->getStacks()))) {
                return $candidate;
            }
        }
        throw new InvalidConfigException('Build flavor not found: ' . $key);
    }
487041
public function getConfiguration(){
        $rest = $this->getService( self::API_CONNECTION_CONFIG);
        $rest->GET();

        return $rest->getResult( models\Connection\Config::class);
    }
997613
public function getConfiguration()
    {
        $configuration = $this->configuration->getParameter('configuration');

        if (!is_array($configuration)) {
            throw new ConnectionException(
                sprintf(
                    "Invalid configuration. It should be an array of settings, '%s' returned.",
                    gettype($configuration)
                )
            );
        }

        return $configuration;
    }
1018016
protected function getConfigHelper()
    {
        $config_file = $this->getConfigFile();

        if (!file_exists($config_file)) {
            throw new \Exception('Config file not found.');
        }

        return new \Illuminate\Config\Repository(array('elasticquent' => require($config_file)));
    }
134435
public function getConfig($key = '')
    {
        if (empty($key)) {
            return $this->_config;
        }

        if (!\array_key_exists($key, $this->_config)) {
            throw new InvalidException('Config key is not set: '.$key);
        }

        return $this->_config[$key];
    }
1321526
protected function getOtherConfig()
    {
        if (!isset($this->objOtherConfig)) {
            $this->objOtherConfig = $this
                ->getEnvironment()
                ->getBaseConfigRegistry()
                ->getBaseConfig();

            $this
                ->getPanel()
                ->getContainer()
                ->initialize($this->objOtherConfig, $this);
        }

        return $this->objOtherConfig;
    }
457035
public function getFactoryOptions()
    {
        if ($this->factoryOptions) {
            return $this->factoryOptions;
        }
        if (!$this->hasFactoryOptions()) {
            $errMsg = 'Factory options not specified';
            throw new Exception\InvalidFactoryConfigException($errMsg);
        }
        $this->factoryOptions = new ConfigurationServiceOptions($this->factory);
        return $this->factoryOptions;
    }
1246899
protected function loadResourceConfig()
    {
        $xml = $this->getXml();

        foreach ($xml->xpath("./resources/paths/path[@path != '']") as $node) {
            $path = (string)$node['path'];
            $scope = (string)$node['scope'];
            $type = (string)$node['type'];

            if (!$scope) {
                $scope = $this->getModuleName();
            }

            $type = $type? : 'base';
            $this->manifest['application_config']['rampage']['resources'][$scope][$type] = $this->getModulePath($path);
        }

        return $this;
    }
1262601
public function getModel()
    {
        if ($this->_model === null) {
            $this->_model = Yii::createObject($this->modelClass);

            if (!$this->_model instanceof NgRestModelInterface) {
                throw new InvalidConfigException("The modelClass '$this->modelClass' must be an instance of NgRestModelInterface.");
            }
        }
    
        return $this->_model;
    }