Increments the group value to simulate deletion of all keys under a group
old values will remain in storage until they expire.

@param string $group The group to clear.
@return bool success
@link https://secure.php.net/manual/en/function.apcu-inc.php
769584
public function clearGroup($group)
    {
        $success = false;
        apcu_inc($this->_config['prefix'] . $group, 1, $success);

        return $success;
    }
1288079
protected function _save($group=null) {
		if(!$group)
			$group = $this;

		$group->doSave();

		if($group instanceof self) {
			foreach($group->fields as $name=>$field) {
				if($field instanceof self)
					$field->_save($field);
			}
		}
	}
344726
public function delete($key, $group = null, $locale = null) {
        $locale = $this->locale($locale);

        $translation = $this->getRepository()
            ->getByKey($key, $locale, $group);

        if( isset($translation->id) )
            $this->getRepository()
                ->removeById($translation->id);

        #@todo need to refresh cache .

        return true;
    }
675094
public function gc($group = null)
	{
		$result = true;

		$path = $this->directory . ($group ? DIRECTORY_SEPARATOR . $group : '');

		if (is_dir($path))
		{
			foreach (new DirectoryIterator($path) as $file)
			{
				if ($file->isDot() || in_array(strtolower($file->getFilename()), static::$skip))
				{
					continue;
				}

				if ($file->isDir())
				{
					$result = $this->gc($file->getFilename());

					if (!$result)
					{
						break;
					}

					continue;
				}

				if (!file_exists($file->getPathname()))
				{
					continue;
				}

				$data = @unserialize(file_get_contents($file->getPathname()));

				if (!$data)
				{
					throw new RuntimeException(sprintf('Cache file "%s" is invalid.', $file->getPathname()));
				}

				if ($this->isDataExpired($data))
				{
					$result = unlink($file->getPathname());
				}
			}
		}

		return $result;
	}
12098
public function clear($group = null) {
        if( isset($group) )
            unset($this->settings[$group]);
        else
            $this->settings = [];

        return $this;
    }
952521
public function isAssignedTo($group): bool
    {
        $group = $this->resolveGroup($group);

        return $this->groups()->where('group_id', is_int($group) ? $group : $group->id)->exists();
    }
16587
public function destroy(Group $group)
    {
        $ml = $this->guiHandler->getManialink($group, $this);
        if ($ml) {
            $this->guiHandler->addToHide($ml, $this);
        }
    }
271873
public function group($group)
    {
        $group = $this->prepareNames(func_get_args(), false);
        $this->group = $group;
        return $this;
    }
1236518
public function groupBy($group)
    {
         //Argument 1 must be a string or array
         Argument::i()->test(1, 'string', 'array');
            
        if (is_string($group)) {
            $group = array($group);
        }
        
        $this->group = $group;
        return $this;
    }
316992
public static function getKeys($group)
    {
        self::loadKeys();
        self::$keys[$group] = isset(self::$keys[$group]) ? self::$keys[$group] : [];

        return self::$keys[$group];
    }
1135247
public function remove(GroupInterface $group)
    {
        $this->em->remove($group);
        $this->em->flush();
        return true;

    }
939190
public function hasGroup($group)
    {
        if (is_string($group)) {
            return $this->groups->contains('name', $group);
        }

        return ! ! $group->intersect($this->groups)->count();
    }
581382
public function setGroup($group)
	{
	    if ($this->options['group']) {
	        $group = str_replace('//', '/', $this->options['group'] . '/' . $group);
	    }
	    
	    return $this->setOption('group', $group);
	}
1212058
public function removeGroup(Group $group)
    {
        $this->hasGroupsProperty();

        if ($this->groups->contains($group)) {
            $this->groups->removeElement($group);
        }
    }
1334682
public function setGroup($group)
    {
        $fs = FileSystem::getFileSystem();

        $fs->chgrp($this->getPath(), $group);
    }
699162
public function removeGroup($group)
	{
		// Make sure there is a valid Form XML document.
		if (!($this->xml instanceof SimpleXMLElement))
		{
			// TODO: throw exception.
			return false;
		}

		// Get the fields elements for a given group.
		$elements = &$this->findGroup($group);
		foreach ($elements as &$element)
		{
			$dom = dom_import_simplexml($element);
			$dom->parentNode->removeChild($dom);
		}

		return true;
	}
1318259
public function update($key, $value, $group = self::DEFAULT_GROUP) {
        $this->repository->updateOrCreate($key, [
            'value' => $value,
            'group' => $group
        ]);

        return true;
    }