@param string|array $groups

@return self
977789
public function setGroups($groups): self
    {
        if ($groups === null) {
            $this->groups = [];

            return $this;
        }

        if (is_array($groups)) {
            $this->groups = $groups;

            return $this;
        }

        $this->groups = explode(',', $groups);

        return $this;
    }
1308338
public function rtcGroupAdd(string $group): self
    {
        if (!$this->rtcGroupExists($group)) {
            $this->runtimeCache[$group] = [];
        }

        return $this;
    }
1007945
public function setErrors(array $errors, string $key = null, string $group = null): self
    {
        if (!empty($group)) {
            if (!empty($key)) {
                $this->errors[$group][$key] = $errors;
            } else {
                $this->errors[$group] = $errors;
            }
        } elseif (!empty($key)) {
            $this->errors[$key] = $errors;
        } else {
            $this->errors = $errors;
        }

        return $this;
    }
395928
public function through($pipes): self
    {
        $this->pipes = is_array($pipes) ? $pipes : func_get_args();

        return $this;
    }
591871
public function groupBy($group) 
    {
        
        $this->sql .= ' GROUP BY ';
        
        if(is_array($group)) {
            foreach($group as $column) {
                $this->sql .= $this->quoteColumnName($column) . ', ';
            }
            
            $this->sql = trim($this->sql, ', ');
        } else {
            $this->sql .= $this->quoteColumnName($group);
        }
        
        return $this;
    }
753742
public function setGroups($groups)
    {
        $this->hasGroupsProperty();

        $this->groups = $groups instanceof ArrayCollection ?
            $groups :
            new ArrayCollection($groups);
    }
1237757
public function removeUserGroups(UserGroup ...$groups)
    {
        foreach ($groups as $group) {
            $this->getUserGroups()->removeElement($group);
        }

        return $this;
    }
262625
public function setGroup($group, $feature)
    {
        if (!isset($this->_aGroup[$group])) {
            $this->_aGroup[$group] = array();
        }
        if (!in_array($feature, $this->_aGroup[$group])) {
            $this->_aGroup[$group][] = $feature;
        }
        return $this;
    }
809824
public function setGroups(array $groups) {
		foreach ($groups as $title => $path) {
			$this->setGroup($title, $path);
		}
	}
444306
private function addGroup($group)
	{
		if($group != null)
		{
			if($this->_groups == null)
				$this->_groups = array();
			$this->_groups[] = $group;
		}
	}
946240
public function group($items)
	{
		$group = [];

		foreach ((array) $items as $item) {
			$group[$item] = $this->formatCmd($item);
		}

		$this->group = $group;

		return $this;
	}
780616
public function setItems(array $items) : self {
      foreach ($items as $item) {
        if (!($item instanceof Token)) {
          throw new \InvalidArgumentException('Expect array of tokens. Token[]');
        }
      }

      $this->items = $items;
      $this->rewind();
      return $this;
    }
167696
public function group($columns)
  {
    if ( is_null($this->group) ){
      $this->group = new Element('GROUP BY', $columns);
    }
    else {
      $this->group->append($columns);
    }

    return $this;
  }
827007
public function removeGroup($groupName)
    {
        if (true === is_string($groupName) && true === in_array($groupName, $this->groups)) {
            foreach (array_keys($this->groups, (string)$groupName, true) as $key) {
                unset($this->groups[$key]);
            }
        }
        return $this;
    }
1199032
protected function isUserAssignedToGroup($groups)
    {
        $isValid = false;

        $user = $this->getUser();
        foreach ($groups as $group) {
            if ($user->inGroup($group->getId())) {
                $isValid = true;
                break;
            }
        }

        return $isValid;
    }
738307
public function array(array $array, array $rules, string $group = null, array $messages = [], $default = null): self
    {
        foreach ($rules as $key => $options) {
            $this->validateInput(
                $array[$key] ?? $default,
                new Configuration($options, $key, $group, $default),
                $messages
            );
        }

        return $this;
    }
457660
public function addGroup(Group $group)
    {
        $this->groups->put($group->getName(), $group);

        return $this;
    }