Returns all server and channel groups the client is currently residing in.

@return array
501061
public function memberOf()
  {
    $cgroups = array($this->getParent()->channelGroupGetById($this["client_channel_group_id"]));
    $sgroups = array();

    foreach(explode(",", $this["client_servergroups"]) as $sgid)
    {
      $sgroups[] = $this->getParent()->serverGroupGetById($sgid);
    }

    uasort($sgroups, array(__CLASS__, "sortGroupList"));

    return array_merge($cgroups, $sgroups);
  }
1309961
public function all()
    {
        $args = func_get_args();
        $name = array_shift($args);
        $results = array();
        foreach ($this->clients as $client) {
            $results[] = call_user_func_array([$client, $name], $args);
        }
        return $results;
    }
815673
static function getServersList()
    {
        $target_list = array();
        $i = 0;
        $wsINI = eZINI::instance( 'wsproviders.ini' );
        // calculate list of target ws servers as it is hard to do that in tpl code
        foreach ( $wsINI->groups() as $groupname => $groupdef )
        {
            if ( $groupname != 'GeneralSettings' && $groupname != 'ExtensionSettings' )
            {
                if ( $wsINI->hasVariable( $groupname, 'providerType' ) )
                {
                    $target_list[] = array( 'name' => $groupname, 'id' => md5( $groupname ) );
                }
                else
                {
                    /// @todo log warning ???
                }
            }
        }
        return $target_list;
    }
84076
public function getChannelList()
    {
        $entityList = $this->_getEntityList('Channels');
        $result = [];

        foreach ($entityList as $channel) {
            $result[] = Channel::createFromOptions($channel);
        }

        return $result;
    }
1113016
public function getAll(): array
    {
        $response = $this->client->request('GET', $this->client->getConfig('base_uri') . '/groups/');

        $json = json_decode($response->getBody());

        $groupCollection = [];

        foreach ($json->groups as $group) {
            $groupCollection[] = (new GroupType)->fromJson($group);
        }

        return $groupCollection;
    }
958599
public function getActiveClients()
    {
        $result = $this->getClients();
        if ( $result->isSuccess() ) {
            $clients = array();
            foreach ($result->data as $client) {
                if ($client->active == "true") {
                    $clients[$client->id] = $client;
                }
            }
            $result->data = $clients;
        }

        return $result;
    }
88508
public function get_all_groups() {
        if ($this->_groups === null) {
            $this->_groups = groups_get_all_groups($this->course->id);
            foreach ($this->_groups as $gid=>$group) {
                $this->_groups[$gid]->name = format_string($group->name);
            }
        }
        return $this->_groups;
    }
1355964
public function groups()
    {
        $result = [];
        foreach ($this->_config['groups'] as $group) {
            $key = $this->_config['prefix'] . $group;
            if (!isset($this->data[$key])) {
                $this->data[$key] = ['exp' => PHP_INT_MAX, 'val' => 1];
            }
            $value = $this->data[$key]['val'];
            $result[] = $group . $value;
        }

        return $result;
    }
562538
public function getSitesGroups()
    {
        Piwik::checkUserHasSuperUserAccess();

        $groups = $this->getModel()->getSitesGroups();
        $cleanedGroups = array_map('trim', $groups);

        return $cleanedGroups;
    }
88739
public static function getAllGroupUidList()
    {
        $data = static::select(array('uid','groups'));
        $group_uid_map = array();
        foreach ($data as $local_ip => $buffer_array) {
            foreach ($buffer_array as $local_port => $items) {
                //$items = ['connection_id'=>['uid'=>x, 'group'=>[x,x..], 'session'=>[..]], 'client_id'=>[..], ..];
                foreach ($items as $connection_id => $info) {
                    if (empty($info['uid']) || empty($info['groups'])) {
                        break;
                    }
                    $uid = $info['uid'];
                    foreach ($info['groups'] as $group_id) {
                        if(!isset($group_uid_map[$group_id])) {
                            $group_uid_map[$group_id] = array();
                        }
                        $group_uid_map[$group_id][$uid] = $uid;
                    }
                }
            }
        }
        return $group_uid_map;
    }
1222692
public static function getConversionGroups() {
		$conversionGroups = array();
		foreach(self::$_conversionUnits as $conversionUnit) {
			$conversionGroups[] = $conversionUnit['Group'];
		}
		return array_merge(array_unique($conversionGroups));
	}
1088463
private function get_groups_all() {
        if (is_null($this->groups)) {
            // NOTE: Performance could be improved here. The system caches user groups
            // in $USER->groupmember[$courseid] => array of groupid=>groupid. Unfortunately this
            // structure does not include grouping information. It probably could be changed to
            // do so, without a significant performance hit on login, thus saving this one query
            // each request.
            $this->groups = groups_get_user_groups($this->course->id, $this->userid);
        }
        return $this->groups;
    }
971682
public static function getChannels()
    {
        $app = Facade::getFacadeApplication();
        $db = $app->make(Connection::class);
        $channels = (array) $db->GetCol('select distinct channel from Logs order by channel asc');

        return $channels;
    }
1188197
public static function getAllGroupClientIdCount()
    {
        $group_client_map = static::getAllGroupClientIdList();
        $group_client_count_map = array();
        foreach ($group_client_map as $group_id => $client_id_list) {
            $group_client_count_map[$group_id] = count($client_id_list);
        }
        return $group_client_count_map;
    }
918112
public function getClientsAndContentTypesAsChoices(): array
    {
        $clientsAndContentTypes = [];

        foreach ($this->clientsConfig as $clientName => $clientConfig) {
            /** @var \Contentful\Delivery\Client $client */
            $client = $clientConfig['service'];

            $clientsAndContentTypes[$client->getSpace()->getName()] = $clientName;
            foreach ($client->getContentTypes()->getItems() as $contentType) {
                /* @var \Contentful\Delivery\Resource\ContentType $contentType */
                $clientsAndContentTypes['>  ' . $contentType->getName()] = $clientName . '|' . $contentType->getId();
            }
        }

        return $clientsAndContentTypes;
    }
1029553
public function findAll()
    {
        $virtualHostNodes = array();
        foreach ($this->getSystemConfiguration()->getContainers() as $containerNodes) {
            foreach ($containerNodes->getServers() as $serverNode) {
                foreach ($serverNode->getVirtualHosts() as $virtualHostNode) {
                    $virtualHostNodes[$virtualHostNode->getPrimaryKey()] = $virtualHostNode;
                }
            }
        }
        return $virtualHostNodes;
    }
509914
public function getRemoteGroups(): array
    {
        $result = [];

        if (!(bool)Configure::read('Groups.remoteGroups.enabled')) {
            return $result;
        }

        if ((bool)Configure::read('Groups.remoteGroups.LDAP.enabled')) {
            $result = $this->_getLdapGroups();
        }

        return $result;
    }