Build the key if a domain or namespace was set.

@param string $key

@return string
167812
protected function composeKey($key)
    {
        $key = !$this->keyPrefix ? $key : $this->keyPrefix.$key;
        return $key;
    }
203325
public function header(string $key): string
    {
        if (array_key_exists($key, $this->headers)) {
            return $this->headers[$key];
        }

        return '';
    }
873964
private function prepareKey($key)
    {
        if (!preg_match('/^[a-zA-Z0-9_-]+$/', $key)) {
            throw new InvalidArgumentException($key);
        }

        return $this->keyPrefix . strtr($key, '-', '_');
    }
149765
protected function parseNamespacedSegments($key)
    {
        list($namespace, $item) = explode('::', $key);

        // If the namespace is registered as a package, we will just assume the group
        // is equal to the namespace since all packages cascade in this way having
        // a single file per package, otherwise we'll just parse them as normal.
        if (array_key_exists($namespace, $this->packages)) {
            return $this->parsePackageSegments($key, $namespace, $item);
        }

        return parent::parseNamespacedSegments($key);
    }
1117841
public function getKeyPath($key)
    {

        $key = str_replace('.', '/', trim($key, '.'));

        return implode('', [$this->_path, "/$key", $this->_format->getExtension()]);
    }
117319
public function getPlain($key = false)
    {
        if ($key) {
            if (isset($this->plain[$key])) {
                return $this->plain[$key];
            } else {
                return null;
            }
        } else {
            return $this->plain;
        }
    }
599809
public function key(string $key): string
    {
        // NOTE: In WordPress, keys that begin with `_`
        // are not displayed in the list of Custom Fields.

        if (!$key) { // Is the key empty?
            return ''; // Explicitly.
        }
        if (mb_strpos($key, '_') === 0) {
            $key    = mb_substr($key, 1);
            $prefix = '_'.$this->App->Config->©brand['©var'].'_';
        } else {
            $prefix = $this->App->Config->©brand['©var'].'_';
        }
        return $prefix.$key;
    }
139684
protected function namespaceAndKey($key)
    {
        if ($this->hasNamespace($key)) {
            return explode($this->nsSeparator, $key, 2);
        }
        return ['default', $key];
    }
964284
protected function parseKey(&$key) {
        $key   =  trim($key);
        if(!is_numeric($key) && !preg_match('/[,\'\"\*\(\)\[.\s]/',$key)) {
           $key = '['.$key.']';
        }
        return $key;   
    }
126849
protected function getUrlForKey($key)
    {
        return isset($this->urls[$key]) ? $this->urls[$key] : null;
    }
883844
public function normalizeKey(string $key): string
    {
        $key = strtr(strtolower(trim($key)), '_', '-');

        if (strpos($key, 'http-') === 0) {
            $key = substr($key, 5);
        }

        return $key;
    }
828283
private static function keyString($key): string
    {
        return $key === null || is_scalar($key)
            ? (string) $key
            : (is_object($key) ? spl_object_hash($key) : self::arrayKeyString($key));
    }
761724
public static function deconstructIniKey($key) {
		$res = [
			'plugin' => null,
			'prefix' => null
		];

		if (strpos($key, '.') !== false) {
			list($res['plugin'], $key) = explode('.', $key);
		}
		if (strpos($key, '/') !== false) {
			list($res['prefix'], $key) = explode('/', $key);
		}
		$res['controller'] = $key;
		return $res;
	}
577878
protected function getMethodByKey($key)
    {
        $method = explode('-', str_replace(self::DOOZR_COMMAND_PREFIX, '', $key));

        foreach ($method as $key => $node) {
            $method[$key] = ucfirst($node);
        }

        return 'set'.implode('', $method);
    }
121497
protected function getNested(string $key)
    {
        $parts = explode('.', $key);
        $result = $this->settings[$parts[0]];

        for ($i = 1; $i < count($parts); ++$i) {
            $value = $parts[$i];

            if (is_array($result) && array_key_exists($value, $result)) {
                $result = $result[$value];
                continue;
            }

            $result = null;
            break;
        }

        return $result;
    }
1212663
protected function serverParamKeyToHeaderName($key)
    {
        $name = null;
        
        if (\Jasny\str_starts_with($key, 'HTTP_')) {
            $name = $this->headerCase(substr($key, 5));
        } elseif (in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH'])) {
            $name = $this->headerCase($key);
        }
            
        return $name;
    }
55753
protected function get($key)
    {
        $this->loadConfigurationLazily();

        if ($this->hasConfigurationValue($key)) {
            $result = $this->configuration[$key];
        } else {
            $result = '';
        }

        return $result;
    }