Defines the current group name.


@param string $groupName Unix group name.

@throws RuntimeException When unable to update current group name.
971060
public function setGroupName($groupName)
    {
        $group = posix_getgrnam($groupName);
        if (! isset($group['gid'])) {
            throw new InvalidArgumentException(sprintf('"%s" is not a valid group name', $groupName));
        }

        $this->setGroupId($group['gid']);
    }
1070615
public function leaveGroup(string $groupName, int $fd)
    {
        $this->createGroup($groupName)->leave($fd);
    }
718428
public function joinGroup(string $groupName, int $fd)
    {
        $this->createGroup($groupName)->join($fd);
    }
478603
public function addGroup($groupName, $nameSuffixes) {
    // @todo More performant dedicated implementation.
    foreach ($nameSuffixes as $suffix) {
      $this->addName($groupName . '.' . $suffix);
    }
  }
425374
public function createGroup(string $groupName, int $maxClients = -1)
    {
        if(!isset($this->groups[$groupName]))
        {
            $this->useRedis(function($resource, $redis) use($groupName){
                $redis->sAdd($this->getGroupsKey(), $groupName);
            });
            $this->groups[$groupName] = [
                'maxClient' => $maxClients,
            ];
        }
    }
563064
public function setOwner( $userName )
	{
		if( !$userName )
			throw new InvalidArgumentException( 'No User Name given.' );
		if( !file_exists( $this->fileName ) )
			throw new RuntimeException( 'File "'.$this->fileName.'" is not existing' );
#		if( !$this->isOwner() )
#			throw new RuntimeException( 'File "'.$this->fileName.'" is not owned by current user' );
		if( !$this->isWritable( $this->fileName ) )
			throw new RuntimeException( 'File "'.$this->fileName.'" is not writable' );
		if( !@chOwn( $this->fileName, $userName ) )
			throw new RuntimeException( 'Only a superuser can change file owner' );
	}
736029
public function setTableName(string $tableName): void
    {
        $tableName = trim($tableName);

        if (empty($tableName)) {
            throw new InvalidArgumentException('tableName cannot be empty');
        }

        $this->tableName = $tableName;
    }
1015574
public function Js ($groupName = self::GROUP_NAME_DEFAULT) {
		$this->actualGroupName = $groupName;
		$this->_getScriptsGroupContainer($groupName);
		return $this;
	}
134784
public function group($group){
        if(is_array($group)){
            $this->group= 'GROUP BY ';
            foreach ($group as $value) {
                $this->group .= $value.',';
            }
            $this->group= rtrim($this->group, ',');
            $this->group.=' ';
        }else{
            $this->group= 'GROUP BY '.$group.' ';
        }
    }
1187534
public function setName(string $name = '') : void
    {
        if (empty($name)) {
            throw new RuntimeException('Panel name not found therefore the object cannot be created');
        }
        $this->name = $name;
    }
350816
public function setPhpName($phpName = null)
    {
        if (null === $phpName) {
            $this->phpName = self::generatePhpName($this->name, $this->phpNamingMethod, $this->namePrefix);
        } else {
            $this->phpName = $phpName;
        }
    }
1219692
protected function setUserAndGroup()
    {
        if (!is_null($this->user)) {
            if (!is_null($this->group)) {
                $group_info = posix_getgrnam($this->user);
                $group_id = $group_info['gid'];
                if (!posix_setgid($group_id)) {
                    throw new \RuntimeException("set group failed");
                }
            }
            $user_info = posix_getpwnam($this->user);
            $user_id = $user_info["uid"];
            if (!posix_setuid($user_id)) {
                throw new \RuntimeException("set user failed");
            }
        }
    }
434663
protected function UserGroupDelete($groupName)
    {
        $return = [];
        $id = $this->UserGetGroupIdByCode($groupName);
        if ($id) {
            $group = new CGroup();
            if ($group->Delete($id)) {
                $return[] = "Delete group {$groupName}";
            } else {
                throw new Exception("Can't delete group {$groupName}");
            }
        } else {
            throw new Exception("Group {$groupName} does not exist");
        }

        return $return;
    }
598285
public function activateGroup($featureName, $groupName)
    {
        $feature = $this->getFeature($featureName);
        $feature->addGroup($groupName);
        $this->saveFeature($feature);
    }
112277
public function groupName(string $name): void
    {
        $parts = array_map(
            function ($n) {
                return Inflector::humanize(Inflector::underscore(str_replace('Controller', '', $n)));
            },
            explode('\\', $name)
        );

        /*
        removes empty array entries
         */
        $parts = array_filter($parts);

        /*
        get just the controller and plugin names
         */
        $parts = array_slice($parts, -2);

        $name = implode(' :: ', $parts);

        $this->set('groupName', $name);
    }
770917
public function addGroup($groupName)
    {
        if (true === is_string($groupName) && false === in_array($groupName, $this->groups)) {
            $this->groups[] = $groupName;
        }
        return $this;
    }
710598
public function setProcessorName($processorName)
    {
        if (!empty($this->processorName))
        {
            throw new RuntimeException('You can set payment transaction processor name only once');
        }

        $this->processorName = $processorName;

        return $this;
    }