Add group by stuff

@param mixed 		$key		By passing an array you can add multiple groups
@return self
332514
public function group_by( $key ) 
	{
		if ( !is_array( $key ) )
		{
			$key = array( $key );	
		}
		
		foreach( $key as $group_key )
		{
			$this->groups[] = $group_key;
		}
		
		return $this;
	}
1096406
final public function groupBy($by)
    {
        if (is_string($by)) {
            $by = explode(',', $by);
        }

        foreach ($by as $val) {
            $val = trim($val);

            if ($val != '') {
                $this->arrayGroupBy[] = $this->identifiers($val);

                if ($this->arrayCaching === TRUE) {
                    $this->arrayCacheGroupBy[] = $this->identifiers($val);
                    $this->arrayCacheExists[] = 'groupby';
                }
            }
        }
        return $this;
    }
1264795
public function addGroup(...$groups)
    {
        collect($groups)->map(function ($group) {
            $this->route['groups'][] = $group->get();
        });

        return $this;
    }
406947
public function addExtra($key, array $options)
    {
        if (!isset($this->extra[$key])) {
            $this->extra[$key] = $options;
        }

        return $this;
    }
588135
public function filterByPrimaryKey($key)
    {
        $this->addUsingAlias(RolePermissionTableMap::COL_ROLE_ID, $key[0], Criteria::EQUAL);
        $this->addUsingAlias(RolePermissionTableMap::COL_PERMISSION_ID, $key[1], Criteria::EQUAL);

        return $this;
    }
1214634
public function repeater(string $key)
    {
        $this->key($key);
        $this->group['repeater'] = true;

        return $this;
    }
844512
public function add($key)
    {
        $configuration = new AdminConfigurationGroup();

        $configuration->key($key);
        $this->configurations->put($key, $configuration);

        return $configuration;
    }
211717
public function removeKey($key)
    {
        if (is_array($key)) {
            foreach ($key as $k) {
                $this->removeKey($k);
            }

            return $this;
        }

        if ($this->keyExists($key)) {
            $array = $this->val();
            unset($array[$key]);

            $this->val($array);
        }

        return $this;
    }
247212
public function add($key, $callable = null)
    {
        if (null !== $callable) {
            $group = new PermissionGroup($callable);
            $group->key($key);

            $this->permissions->put($key, $group);
        } else {
            $group = new PermissionGroup();

            $group->key($key);
            $this->permissions->put($key, $group);
        }
        return $group;
    }
177846
public function addGroupBy($_)
    {
        RecursiveArgs::each(func_get_args(), function ($arg) {
            $this->groupByClauses[] = $arg;
        });

        return $this;
    }
1240837
static function groups($key = null)
    {
        if (!isset(self::$trace)) self::$trace = new Trace('TRACE');
        if (isset($key)){
            return self::$trace->__get($key);
        }else{
            return self::$trace;
        }
    }
1154305
protected function addGroup(string $key) : HtmlContainer
    {
        $group = (new HtmlContainer('<optgroup>'))
            ->addAttribute('label', $key);

        $this->allOptions['group-' . $key] = $group;

        return $group;
    }
1210131
public function delete($key)
    {
        $key = (string)$key;

        if (\array_key_exists($key, self::$registry)) {
            unset(self::$registry[$key]);
        }
        return $this;
    }
1135642
public function groupBy($key, $tableName = null)
    {
        if (!$tableName) {
            $tableName = $this->getTableName();
        }
        $this->groupBy[] = ['key' => $key, 'tableName' => $tableName];
        return $this;
    }
208340
public function groupBy($groupKeys)
    {
        if (is_string($groupKeys))
        {
            $groupKeys = $this->stringArgumentToArray($groupKeys);
        }

        foreach ($groupKeys as $groupKey) 
        {
            $this->groups[] = $groupKey;
        }

        return $this;
    }
59603
public function copyto($key)
    {
        $var=&Base::instance()->ref($key);
        foreach (array_merge($this->_schema['init'],
                 array_filter($this->_schema['values'], array($this, 'filterRule')),
                 array_filter($this->_schema['others'], array($this, 'filterRule'))) as $key=>$val)
            $var[$key]=$val;

        return $this;
    }
756116
public function withKey($key)
    {
        $this->lastKey = $key;
        $this->keys[$key] = null;

        return $this;
    }