Returns the config if possible

@return mixed returns config if successful else null
173772
public function config_read($name) {
        global $CFG;
        if (!empty($this->plugin)) {
            $value = get_config($this->plugin, $name);
            return $value === false ? NULL : $value;

        } else {
            if (isset($CFG->$name)) {
                return $CFG->$name;
            } else {
                return NULL;
            }
        }
    }
819101
public function getConfig($name = null)
    {
        if (!is_null($name)) {
            if (isset($this->_config[$name])) {
                return $this->_config[$name];
            } else {
                return null;
            }
        }

        return $this->_config;
    }
289256
public function get_setting() {
        $result = $this->config_read($this->name);

        if (is_null($result)) {
            return NULL;
        }
        if ($result === '') {
            return array();
        }
        $enabled = explode(',', $result);
        $setting = array();
        foreach ($enabled as $option) {
            $setting[$option] = 1;
        }
        return $setting;
    }
1171240
protected function _getConfig($key = null) {
		$language = Configure::read('Config.language');
		$key = (string)$key;

		if ($key === 'Language') {
			if (empty($language)) {
				return null;
			}

			$configs = $language;
		} else {
			$configPath = $this->_modelConfigSettingsApp->getNameConfigKey();
			if (!empty($key)) {
				$configPath .= '.' . $key;
			}

			$configs = Configure::read($configPath);
			if ($configs === null) {
				return null;
			}

			if (empty($key)) {
				$configs['Language'] = $language;
			}
		}

		if (!empty($key)) {
			$configs = [$key => $configs];
		}

		$listSerializedFields = $this->_modelConfigSettingsApp->getListSerializeFields();
		$result = [];
		foreach ($configs as $configName => $configValue) {
			switch ($configName) {
				case 'EmailSmtppassword':
					if (!empty($configValue)) {
						$result[$this->alias][$configName] = Security::decrypt(base64_decode($configValue), Configure::read('Security.key'));
					} else {
						$result[$this->alias][$configName] = $configValue;
					}
					break;
				default:
					if (in_array($configName, $listSerializedFields) && !empty($configValue)) {
						$configValue = unserialize($configValue);
					}
					$result[$this->alias][$configName] = $configValue;
			}
		}

		if (!empty($key)) {
			return Hash::get($result, $this->alias . '.' . $key);
		}

		if (empty($result)) {
			return null;
		}

		return $result;
	}
362855
protected function getConfigs()
    {
        if ($this->hasCache()) {
            return $this->getCache();
        }

        $pluginConfigs = $this->pluginConfig;

        $configs = [];

        foreach ($pluginConfigs as $name => $pluginConfig) {
            $config = $this->configFields->convertBc(
                $name,
                $pluginConfig
            );

            $configs[] = new ConfigBasic($config);
        }

        $newConfigs = $this->configRepositoryJson->find();

        $configs = array_merge($configs, $newConfigs);

        $this->setCache($configs);

        return $configs;
    }
102863
public function getConfig($keyName = null)
    {
        if (null === $keyName) {
            return $this->config;
        } elseif (isset($this->config[$keyName])) {
            return $this->config[$keyName];
        } else {
            return null;
        }
    }
806296
public function getConfigValue() {
    $session = $this->getSession();
    $request = $this->getRequest();
    $response = $this->getResponse();

    // load model
    $value = null;
    $authUser = $this->principalFactory->getUser($session->getAuthUser());
    if ($authUser) {
      $configKey = $request->getValue('name');

      // find configuration
      $configObj = null;
      $configList = Node::filter($authUser->getValue('UserConfig'), null, null,
              ['name' => $configKey]);
      $value = sizeof($configList) > 0 ?
              $configObj = $configList[0]->getValue('value') : null;
    }
    $response->setValue('value', $value);

    // success
    $response->setAction('ok');
  }
667262
protected function getProfileConfig()
    {
        $configCallable = $this->config;
        $config = $configCallable($this->getProfileConfigKey());

        if (!is_array($config)) {
            $config = [$config];
        }

        return array_filter($config);
    }
987013
public function getConfig()
	{
		return $this->_node->__isset( 'config' ) && is_array( $this->_node->config ) ? $this->_node->__get( 'config' ) : array();
	}
16171
public function getConfig($s_key = null)
    {
        if ($s_key) {
            if (isset($this->st_viewConfig[$s_key])) {
                return $this->st_viewConfig[$s_key];
            }

            return false;
        }

        return $this->st_viewConfig;
    }
730147
public function getConfig() {
		if(!$this->config) {
			$this->config = $config = new \Asgard\Config\Config($this->getCache());
			if(file_exists($this->params['root'].'/config'))
				$config->loadDir($this->params['root'].'/config', $this->getEnv());
		}
		return $this->config;
	}
998347
public function getConfig($key = null, $default = null)
    {
        $name = $this->current ?: 'default';

        $configs = $this->configs[$name];
        if ($key === null) {
            return $configs;
        }

        return isset($configs[$key]) ? $configs[$key] : $default;
    }
370312
public function config()
    {
        if ($this->appConfig) {
            return $this->appConfig;
        }

        return $this->appConfig = $this->app->make('config');
    }
819677
public function getConfig()
    {
        $config = [];
        foreach ($this->providers as $key => $provider) {
            $config[$key] = $provider->getConfig();
        }

        return $config;
    }
829810
public function getConfig()
    {
        if ($this->cache instanceof Cache\CacheInterface && !empty($configs = $this->cache->getConfig())) {
            return $configs;
        }

        $configs = $this->moduleHandler->getModulesConfig();
        foreach ($this->files as $file) {
            $config = require $file;
            if (!is_array($config)) {
                throw new Exception\RuntimeException(sprintf('The config in "%s" file must be array data type', $file));
            }
            $configs = ArrayUtils::merge($configs, require $file);
        }

        return $this->cleanUp($configs);
    }
1159054
public function getParametersConfig() {
		if ($this->_parametersConfig === null) {
			$this->_parametersConfig     = new Config();
			$this->_parametersConfigLock = true;
		}
		
		return $this->_parametersConfig;
	}
402014
public function getFieldConfig()
    {
        if ($this->fieldConfig !== null) {
            return $this->fieldConfig;
        }

        return $this->fieldConfig = $this->makeConfig($this->model->settingsFields);
    }