@param string $key

@return Config
176243
public function findOrCreate($key)
    {
        if ($this->exists($key)) {
            return $this->configs[$key];
        }

        $config = new $this->class();
        $config->setName($key);

        return $config;
    }
864148
public function getSection(string $key) : ConfigurationBagInterface
    {
        return new ConfigurationBag(isset($this->configuration[$key]) ? $this->configuration[$key] : []);
    }
253481
public static function key($key)
    {
        $config = static::where('key', $key)->first();

        return $config->value ?? config($key, null);
    }
127873
public function set_config($key, $value)
	{
		\Arr::set($this->config, $key, $value);

		return $this;
	}
93656
public function addByKey(string $key): Setting
    {
        $setting = new SimpleSetting($key);

        $this->add($setting);

        return $setting;
    }
716539
public function get($key)
    {
        $parts = explode('.', $key);
        $offset = $this->config;

        foreach($parts as $part) {
            if(!isset($offset[$part])) return null;

            $offset = $offset[$part];
        }

        return $offset;
    }
586650
protected function getConfigValue($key)
    {
        list($output) = $this->getSystemService()->execute($this->_('git config --global --get %s', $key));

        return trim($output);
    }
1271847
public static function get($key = null)
    {
        if ($key) {
            $config = static::findBy(['key' => $key]);
            return $config ? $config->getValue() : '';
        } else {
            $config = [];
            foreach (static::all() as $c) {
                $config[$c->key] = $c->getValue();
            }
            return $config;
        }
    }
410866
public function getConfigOption($key, $default = null)
    {
        if (array_key_exists($key, $this->configuration)) {
            return $this->configuration[$key];
        }

        return $default;
    }
425122
public function getProfileConfig($key)
	{
		// If no profile setted load the config.php
		if (empty($this->_profile)) {
			return $this->_configs->get('bbcoder::profile.default.'.$key);
		}

		// Check if the profile overwrites the default config.
		if ($this->_configs->has('bbcoder::profile.'.$this->_profile.'.'.$key)) {
			return $this->_configs->get('bbcoder::profile.'.$this->_profile.'.'.$key);
		}

		return $this->_configs->get('bbcoder::profile.default.'.$key);
	}
565663
public function remove($key)
    {
        $key = is_array($key) ? $key : [$key];
        $config = $this->data;
        $data = &$config;
        while ($key) {
            $k = array_shift($key);
            if (!$key) {
                unset($config[$k]);
                break;
            }
            $config[$k] = isset($config[$k]) ? $config[$k] : [];
            $config = &$config[$k];
        }
        $this->data = $data;
        return $this->save();
    }
127678
public function get($key)
    {
        if ($this->configurations->has($key)) {
            return $this->configurations->get($key);
        }

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

        return $this;
    }
485177
protected function alreadyConfigured($key)
    {
        $config = $this->getClassMetadata()->getExtension($this->getExtensionName());

        return isset($config[$key]);
    }
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;
    }
67839
public static function get($key)
    {
        self::getInstance();

        if (array_key_exists($key, self::$settings))
        {
            return self::$settings[$key];
        }

        throw new \InvalidArgumentException("The key $key doesn't exist in the Config Registry.");
    }
186531
public function getConfigVariable(string $key)
    {
        if ($key === '' || $key === null) {
            return null;
        }

        if (!isset($this->setting[$key])) {
            return null;
        }

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