@param string $key

@return Config
167313
public function getSection($key)
    {
        if (false === $this->hasSection($key)) {
            throw new ConfigException(sprintf('"%s" is not a section', $key));
        }

        // do not return the parent object if we were subclassed, but an actual
        // "Config" object to avoid copying in the defaults if set
        return new self($this->configData[$key]);
    }
697767
public static function read(string $key)
    {
        /* Check if initialized */
        if (!self::$initialized) {
            self::initialize();
        }

        /* Return key */
        return self::$configs[$key];
    }
1233047
public function get($key)
    {
        if (isset($this->config[$key])) {
            // if true, 'config' is also always set
            return $this->config[$key]['config'];
        }

        $conf = null;
        $file = $this->getFileNameForKey($key);

        // check if in cache
        if (null !== $this->cache) {
            $cacheKey = $this->getCacheKeyForFile($file);
            $conf = $this->app[$this->cache]->get($cacheKey);
            if (false !== $conf) {
                $this->config[$key] = [
                    'config' => $conf,
                    'cacheKey' => $cacheKey,
                ];

                return $conf;
            }
        }

        // Load from file
        $conf = $this->loader->getConfig($file);
        $this->config[$key] = ['config' => $conf];

        // Store in the cache
        if (null !== $this->cache) {
            $this->config[$key]['cacheKey'] = $cacheKey;
            $this->app[$this->cache]->set($cacheKey, $conf);
        }

        return $conf;
    }
1006253
public function get($key)
    {
        $key = is_array($key) ? $key : [$key];
        $config = $this->data;
        while ($key) {
            $k = array_shift($key);
            $config = isset($config[$k]) ? $config[$k] : [];
        }
        return $config;
    }
430669
protected function getConfiguration($key = null)
    {
        return $key ? static::$config[$this->getProtocol()][$key] : static::$config[$this->getProtocol()];
    }
320119
public function remove($key)
    {
        if ($this->has($key)) {
            $cont = clone $this;
            $cont->removeParameter($key);

            return $cont;
        }

        return $this;
    }
328956
protected function getConfig($key = null)
    {
        if (!is_null($key)) {
            if (!array_key_exists($key, $this->config)) {
                throw new \InvalidArgumentException('Config key "'.$key.'" does not exist. Valid keys are: "'.implode(', ', array_keys($this->config)).'"');
            }

            return $this->config[$key];
        }

        return $this->config;
    }
1069236
private function getValue ($key)
    {
        return isset($this->configuration[$key])
            ? $this->configuration[$key]
            : null;
    }
252823
protected function buildKey($key)
    {
        return $this->aerospike->initKey(
            $this->config['namespace'],
            $this->config['set'],
            $this->config['prefix'] . $key
        );
    }
508704
private function _getConfig(string $key, $default = null)
    {
        if (isset($this->_config[$key])) {
            return $this->_config[$key];
        }

        return $default;
    }
347567
public function setKey($key)
    {
        $arr = $this->parseKey($key);
        $this->key = $arr['key'];
        $this->identifier = $arr['identifier'];
        $this->prefix = $arr['prefix'];

        return $this;
    }
1119808
public function get(string $key = null)
    {
        $result = (null !== $key)
            ? $this->_config[$key] ?? null
            : $this->_config;

        return $result;
    }
380311
public static function get(string $key = null)
    {
        self::set();

        if (empty($key)) {
            return self::$config;
        }

        $keys  = explode('.', $key);
        $value = self::$config;

        foreach ($keys as $key) {
            if ( ! isset($value[$key])) {
                return null;
            }

            $value = $value[$key];
        }

        return $value;
    }
91516
final public static function getConfig($key = null)
    {
        $calledClass = get_called_class();

        // Load config
        if (!isset(self::$loadedConfigSet[$calledClass]) || null === self::$loadedConfigSet[$calledClass]) {
            self::$loadedConfigSet[$calledClass] = array_merge(self::$configDefault, static::loadConfig());
        }

        // Get config property
        return (null === $key)
            ? self::$loadedConfigSet[$calledClass]
            : self::$loadedConfigSet[$calledClass][$key];
    }
355157
public function addConfiguration($key)
    {
        $adminConfiguration = new AdminConfiguration();

        $adminConfiguration->key($key);
        $this->groupList->put($key, $adminConfiguration);

        return $adminConfiguration;
    }
72469
protected function _configRead($key)
    {
        if ($key === null) {
            return $this->_config;
        }

        if (strpos($key, '.') === false) {
            return isset($this->_config[$key]) ? $this->_config[$key] : null;
        }

        $return = $this->_config;

        foreach (explode('.', $key) as $k) {
            if (!is_array($return) || !isset($return[$k])) {
                $return = null;
                break;
            }

            $return = $return[$k];
        }

        return $return;
    }
879712
public function getConfig($key)
    {
        if (null === $this->configs) {
            $this->loadConfigs();
        }

        if (false == array_key_exists($key, $this->configs)) {
            $availableKeys = implode(', ', array_keys($this->configs));
            throw new \RuntimeException(sprintf('Config "%s" could not be found. Found: %s', $key, $availableKeys));
        }

        $config = $this->configs[$key];

        return $config;
    }