read config data

@param string
@return array
354617
static function read($key = ''){
		if($key === ''){
			return self::$data;
		}
		
		$key = self::engineName($key);
		
		$file = implode($key->file,'.');


		if(!isset(self::$data[$file])){
			return null;
		}
		$config = self::$data[$file];
		
		foreach($key->keys as $keys){
			if(!isset($config[$keys])){
				return null;
			}
			$config = $config[$keys];
		}
		return $config;
	}
966032
protected function parseConfig(string $config): array
    {
        $config = json_decode($config, true);
        if ($config === null) {
            throw new ConfigFileFormatException("Config files should be written in valid JSON");
        }
        return $config;
    }
1338178
protected function getConfigItem(string $key)
    {
        if ($this->config === null) {
            $this->config = $this->container->config->get('exceptions', []);
        }

        return array_get($this->config, $key);
    }
609499
public function loadConfigData()
    {
        $this->config = json_decode(file_get_contents(CONFIG_DIR . DIRECTORY_SEPARATOR . self::CONFIG_FILE), true) ?: [];
        $this->debug = array_key_exists('debug', $this->config) ? (bool)$this->config['debug'] : FALSE;
    }
701305
def config_read():
    """"""
    config_file = (u"{0}config.ini".format(CONFIG_DIR))
    if not os.path.isfile(config_file):
        config_make(config_file)
    config = configparser.ConfigParser(allow_no_value=True)
    try:
        config.read(config_file, encoding='utf-8')
    except IOError:
        print("Error reading config file: {}".format(config_file))
        sys.exit()
    # De-duplicate provider-list
    providers = config_prov(config)
    # Read credentials for listed providers
    (cred, to_remove) = config_cred(config, providers)
    # remove unsupported and credential-less providers
    for item in to_remove:
        providers.remove(item)
    return cred, providers
945683
public function getConfigs()
    {
        $configs = [];

        foreach ($this->getConfigFiles() as $file) {
            $name = basename($file->getFilename(), '.php');

            $values = require $file->getRealPath();

            $configs[$name] = $values;
        }

        return $configs;
    }
431395
public function readConfigs() 
	{
        $paths = array('~/bookability.ini', '/etc/bookability.ini');
        foreach($paths as $path) 
		{
            if (file_exists($path)) 
			{
                $config = parse_ini_file($path);
                if ($config) 
				{
                    return $config;
                }
            }
        }
        return array();
    }
647282
public static function config($option = null)
    {
        if (is_array($option)) {
            self::$config = new DataArray($option);
        }
        if (self::$config instanceof DataArray) {
            return self::$config->get();
        }
        return [];
    }
86950
protected function readConfig($filename)
    {
        if (empty($filename) || !is_string($filename) || !file_exists($filename)) {
            throw new RuntimeException(sprintf('Configuration file "%s" was not found.', $filename));
        }
        $this->_modifiedTime = max($this->_modifiedTime, filemtime($filename));

        if (function_exists('parse_ini_file')) {
            return parse_ini_file($filename, true);
        } else {
            return parse_ini_string(file_get_contents($filename), true);
        }
    }
1210277
protected function readConfig() {
		$file = $this->path->getConfigPath() . '/translation.php';
		if (file_exists($file)) {
			$config = require($file);
			if (isset($config['translations'])) {
				$this->translations = $config['translations'];
			}
			if (isset($config['defaultLocale'])) {
				$this->setDefaultLocale($config['defaultLocale']);
			}
		}
		return $this;
	}
117896
private function readConfigFile()
    {
        // reading the config file to be stored in the 'configurations' variable below
        $configurations = $this->config_reader->get('api');
        $this->mappers_base_namespace = $configurations['mappers'];
        $this->limit = $configurations['limit'];
    }
815297
protected function readFile(string $file) : array
    {
        if (!file_exists($file)) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Configuration %s is not exists',
                    $file
                ),
                E_WARNING
            );
        }

        if (!is_array(($configs = $this->parseFromFile($file)))) {
            throw new \RuntimeException(
                sprintf(
                    'Invalid %s configuration from file: %s',
                    ltrim(strrchr(get_class($this), '\\'), '\\'),
                    $file
                ),
                E_NOTICE
            );
        }

        return $configs;
    }
697767
public static function read(string $key)
    {
        /* Check if initialized */
        if (!self::$initialized) {
            self::initialize();
        }

        /* Return key */
        return self::$configs[$key];
    }
497283
def _read_config_file(self):
        """"""

        try:
            with open(self.config, 'r') as f:
                config_data = json.load(f)
        except FileNotFoundError:
            config_data = {}

        return config_data
1315544
public static function config_get_configuration_array($data) {
        $config = array();

        if (isset($data->prefix)) {
            $config['prefix'] = $data->prefix;
        }
        return $config;
    }
201057
private function readFromCache()
    {
        if (($config = $this->cacheConfig->getCacheManager()->get($this->cacheConfig->getKey())) !== null) {
            return $config;
        }
        $config = $this->read();
        $this->cacheConfig->getCacheManager()->set(
            $this->cacheConfig->getKey(),
            $config,
            $this->cacheConfig->getTtl()
        );

        return $config;
    }
718185
protected function readConfig()
    {
        if ($this->loaded == false) {
            $this->config = $this->loader->getDatas();
            $this->loaded = true;
        }

        return $this;
    }