Check if a key exists for a group. Is used for translations management

@param string $key Key of text to translate
@param string $group Group of keys
@param bool $allowempty Marker if empty key is allowed

@return bool
552870
public function checkKeyExists($key,$group,$allowempty = false) {
		if (!$this->locale || $this->locale == '') {
			return false;
		}
		
		$data = $this->loadDataForGroup($group,$allowempty);
		
		if (isset($data[$key])) {
			// check if data are in a file
			if (strpos($data[$key],'file:') === 0) {
				$filname = substr($data[$key],5);
				$file_path = $this->localespath.$this->locale.'/files/'.$filname;
				
				if (@file_exists($file_path)) {
					return true;
				}
				
				return false;
			}
			return true;
		}
		
		return false;
	}
445426
public function delete($key, $group = self::DEFAULT_GROUP) {
        if( isset($this->settings[$group][$key]) )
            unset($this->settings[$group][$key]);

        return $this;
    }
955785
public function containsKey(string $key): bool
    {
        if (isset($this->orgData[$key])) {
            return ! isset($this->removeAttributes[$key]);
        } else {
            return isset($this->addAttributes[$key]);
        }
    }
693069
public String get(String group, String key) {
		return this.groupedMap.get(group, key);
	}
1310064
public function get($key = null, $grouping = 'app', $force_refresh = false)
    {
        //  Check that it's a valid key/grouping pair
        if (!isset($this->notifications[$grouping]->options[$key])) {
            $this->setError($grouping . '/' . $key . ' is not a valid group/key pair.');
            return false;
        }

        // --------------------------------------------------------------------------

        if (empty($this->emails[$grouping]) || $force_refresh) {

            $oDb = Factory::service('Database');
            $oDb->where('grouping', $grouping);
            $notifications = $oDb->get($this->table)->result();

            $this->emails[$grouping] = [];

            foreach ($notifications as $setting) {
                $this->emails[$grouping][$setting->key] = json_decode($setting->value);
            }
        }

        // --------------------------------------------------------------------------

        if (empty($key)) {
            return $this->emails[$grouping];
        } else {
            return isset($this->emails[$grouping][$key]) ? $this->emails[$grouping][$key] : [];
        }
    }
41624
public static function isValidKey($key) {
        if(!is_string($key)) {
            throw EnumerationException::invalidKeyType(gettype($key));
        }

        return array_key_exists($key, self::toArray());
    }
432982
public function has($key)
    {
        return ! collect(is_array($key) ? $key : func_get_args())->contains(function ($key) {
            return is_null($this->get($key));
        });
    }
180833
public function has( $key )
	{
		if( empty( $key ) )																		//  no Key given
			throw new InvalidArgumentException( 'Key must not be empty.' );						//  throw Exception
		if( isset( $this->pairs[$key] ) )														//  Key is set on its own
			return TRUE;
		else																					//  Key has not been found
		{
			$key		.= $this->divider;														//  prepare Prefix Key to seach for
			foreach( $this->pairs as $pairKey => $pairValue )									//  iterate all stores Pairs
			{
				if( $pairKey[0] !== $key[0] )													//  precheck for Performance
					continue;																	//  skip Pair
				if( strpos( $pairKey, $key ) === 0 )											//  Prefix Key is found
					return TRUE;
			}
		}
		return FALSE;
	}
310413
public function setGroup($key, $checkLastModified = true)
    {
        $this->_groupKey = $key;
        if ($checkLastModified) {
            if (! $this->groupsConfigFile) {
                $this->groupsConfigFile = self::app()->groupsConfigPath;
            }
            if (is_file($this->groupsConfigFile)) {
                $gc = (require $this->groupsConfigFile);
                $keys = explode(',', $key);
                foreach ($keys as $key) {
                    if (!isset($gc[$key])) {
                        // this can happen if value is null
                        // which could be solved with array_filter
                        continue;
                    }

                    $this->_lastModified = self::getLastModified($gc[$key], $this->_lastModified);
                }
            }
        }
    }
204401
protected function isAllowedKey($key): bool
    {
        return empty($this->allowedKeys) || \in_array($key, $this->allowedKeys, true);
    }
223968
public function getByKey($key, $group = null) {
        $query =  $this->model
            ->where('key', $key);

        if(! is_null($group))
            $query->where('group', $group);

        return $query->get();
    }
216085
function group($key = null)
    {
        if (empty($key)) $key = sizeof($this->children);
        if (!isset($this->children[$key])){
            $this->children[$key] = new Trace($key, null);
        }
        return $this->children[$key];
    }
96912
public function isOptionKeyValid($key)
    {
        self::parseValidKeys();

        if (isset(self::$validOptions[$key])) {
            return true;
        }

        return false;
    }
1249577
public function has(string $key): bool
    {
        return isset($this->data[ $key ]) && !empty($this->data[ $key ]);
    }
1239735
public function isEmpty($key)
    {
        return !array_has($this->data, $key) || filled(array_get($this->data, $key));
    }
108303
public function hasItem($key)
    {
        if (!$this->getOptions()->getEnabled()) {
            return false;
        }

        $this->normalizeKey($key);

        $result = false;
        try {
            $result = $this->internalHasItem($key);
        } catch (\Exception $e) {
        }

        return $result;
    }
1219767
protected function doSet($key, $grouping, $value)
    {
        //  Check that it's a valid key/grouping pair
        if (!isset($this->notifications[$grouping]->options[$key])) {
            $this->setError($grouping . '/' . $key . ' is not a valid group/key pair.');
            return false;
        }

        // --------------------------------------------------------------------------

        $oDb = Factory::service('Database');
        $oDb->where('key', $key);
        $oDb->where('grouping', $grouping);
        if ($oDb->count_all_results($this->table)) {
            $oDb->where('grouping', $grouping);
            $oDb->where('key', $key);
            $oDb->set('value', json_encode($value));
            $oDb->update($this->table);
        } else {
            $oDb->set('grouping', $grouping);
            $oDb->set('key', $key);
            $oDb->set('value', json_encode($value));
            $oDb->insert($this->table);
        }
    }