Crunz\Configuration\Configuration::has PHP Method

has() public method

Check if a parameter exist
public has ( string $key ) : boolean
$key string
return boolean
    public function has($key)
    {
        if (!$array) {
            return false;
        }
        if (is_null($key)) {
            return false;
        }
        if (array_key_exists($key, $this->parameters)) {
            return true;
        }
        $array = $this->parameters;
        foreach (explode('.', $key) as $segment) {
            if (is_array($array) && array_key_exists($key, $array)) {
                $array = $array[$segment];
            } else {
                return false;
            }
        }
        return true;
    }