Return all of the known service types.

@param string $group

@return \DreamFactory\Core\Contracts\ServiceTypeInterface[]
773768
public function getServiceTypes($group = null)
    {
        ksort($this->types, SORT_NATURAL); // sort by name for display
        if (!empty($group)) {
            if (!empty($group) && !is_array($group)) {
                $group = array_map('trim', explode(',', trim($group, ',')));
            }
            $group = array_map('strtolower', (array)$group);
            $types = [];
            foreach ($this->types as $type) {
                if (in_array(strtolower($type->getGroup()), $group)) {
                    $types[$type->getName()] = $type;
                }
            }

            return $types;
        }

        return $this->types;
    }
749428
public function getPaths($group = '__DEFAULT__')
	{
		if ( ! isset($this->paths[$group]))
		{
			return [];
		}

		return array_values($this->paths[$group]);
	}
579863
public function getSitesFromGroup($group)
    {
        $db = $this->getDb();
        $sites = $db->fetchAll("SELECT * FROM " . $this->table . "
                                WHERE `group` = ?", $group);

        return $sites;
    }
1025149
public function single($group)
    {
        $entry = new Entry($group);

        $entry
            ->conditionalField('id', function () {
                return Subbly::api('subbly.user')->hasAccess('subbly.backend.auth');
            })

            ->field('name')
            ->field('permissions')

            ->dateField('created_at')
            ->dateField('updated_at')
        ;

        return $entry->toArray();
    }
1363041
public function getGroups($server)
    {
        $groups = [];

        if (isset($server['group']) &&
            $search = $this->search($server, '(&(objectClass='.$server['group'].'))')
        ) {
            $groups = $this->getEntries($search);
        }

        return $groups;
    }
389906
private function findUsedTypes($service, Type $type)
    {
        if ($type instanceof Enum) {
            return array($type);
        }
        if (!$type instanceof ComplexType) {
            return array();
        }

        $foundTypes = array($type);

        // Process Base type
        $baseType = $type->getBaseType();
        if ($baseType) {
            $foundTypes = array_merge($foundTypes, $this->findUsedTypes($service, $baseType));
        }

        $members = $type->getMembers();
        foreach ($members as $member) {
            /** @var Variable $member */
            // Remove array mark from type name
            $memberTypeName = str_replace('[]', '', $member->getType());
            $memberType = $service->getType($memberTypeName);
            if (!$memberType) {
                continue;
            }

            $foundTypes = array_merge($foundTypes, $this->findUsedTypes($service, $memberType));
        }

        return $foundTypes;
    }
966412
public function getRuleResultsByGroup($group)
    {
        $results = [];
        foreach ($this->getRuleResults() as $rule => $ruleResult) {
            if (in_array($group, $ruleResult->getGroups())) {
                $results[$rule] = $ruleResult;
            }
        }

        return $results;
    }
1137886
public function findAllByGroupQuery(GroupInterface $group, bool $active = true): Query
    {
        $qb = $this->createQueryBuilder('r');

        return $qb
            ->join('r.groups', 'g')

            // Add conditions.
            ->andWhere($qb->expr()->eq('g', ':group'))
            ->andWhere($qb->expr()->eq('r.active', ':active'))

            // Add parameters.
            ->setParameter('group', $group)
            ->setParameter('active', $active)

            // Order by and get results.
            ->orderBy('r.pinned', 'DESC')
            ->addOrderBy('r.name', 'ASC')
            ->getQuery();
    }
13055
private function getMiddleWareFromGroup(RouteGroup $group, array $middleWareList = [])
    {
        if ($group->middleWare) {
            $middleWareList = \array_merge($group->middleWare, $middleWareList);
        }
        if (\is_null($group->parentGroup)) {
            return $middleWareList;
        }
        return $this->getMiddleWareFromGroup($group->parentGroup, $middleWareList);
    }
1036229
public static function getAllClientSessions($group = '')
    {
        $gateway_data = GatewayProtocol::$empty;
        if (!$group) {
            $gateway_data['cmd']      = GatewayProtocol::CMD_GET_ALL_CLIENT_SESSIONS;
        } else {
            $gateway_data['cmd']      = GatewayProtocol::CMD_GET_CLIENT_SESSIONS_BY_GROUP;
            $gateway_data['ext_data'] = $group;
        }
        $status_data      = array();
        $all_buffer_array = static::getBufferFromAllGateway($gateway_data);
        foreach ($all_buffer_array as $local_ip => $buffer_array) {
            foreach ($buffer_array as $local_port => $data) {
                if ($data) {
                    foreach ($data as $connection_id => $session_buffer) {
                        $client_id = Context::addressToClientId($local_ip, $local_port, $connection_id);
                        if ($client_id === Context::$client_id) {
                            $status_data[$client_id] = (array)$_SESSION;
                        } else {
                            $status_data[$client_id] = $session_buffer ? Context::sessionDecode($session_buffer) : array();
                        }
                    }
                }
            }
        }
        return $status_data;
    }
173726
public function all($group = self::DEFAULT_GROUP) {
        if( $group == self::DEFAULT_GROUP )
            return $this->settings;

        return isset($this->settings[$group]) ? $this->settings[$group] : [];
    }
1320713
public function group($group = null)
    {
        if ($group !== null) {
            $this->_group = $group;
        }
        return $this->_group;
    }
603921
protected function getBuildConfig($group)
    {
        if (!$this->buildRepository || !$this->checkBuilds) {
            return null;
        }

        if (!$this->buildRepository->has($group)) {
            return null;
        }

        $config = $this->buildRepository->getOrFail($group);

        $config->target();

        if (!$this->mergeOption(self::CHECK_COMPILED_FILE_EXISTS, $config->managerOptions())) {
            return $config;
        }

        if (!$this->buildRepository->compiledFileExists($config)) {
            return null;
        }

        return $config;
    }
316992
public static function getKeys($group)
    {
        self::loadKeys();
        self::$keys[$group] = isset(self::$keys[$group]) ? self::$keys[$group] : [];

        return self::$keys[$group];
    }
987503
public static function getClientCountByGroup($group = '')
    {
        $gateway_data             = GatewayProtocol::$empty;
        $gateway_data['cmd']      = GatewayProtocol::CMD_GET_CLIENT_COUNT_BY_GROUP;
        $gateway_data['ext_data'] = $group;
        $total_count              = 0;
        $all_buffer_array         = self::getBufferFromAllGateway($gateway_data);
        foreach ($all_buffer_array as $local_ip => $buffer_array) {
            foreach ($buffer_array as $local_port => $count) {
                if ($count) {
                    $total_count += $count;
                }
            }
        }
        return $total_count;
    }
482802
public function offsetGet($group)
    {
        if (!isset($this[$group])) {

            // Load builder from file or instantiate an empty one.
            if ($this->hasConfigFile($group)) {
                $this[$group] = $this->load($group);
            } else {
                $this[$group] = ServiceBuilder::factory(array());
            }

            // Initialize the "removed" flag.
            $this->removed[$group] = array();
        }
        return parent::offsetGet($group);
    }
179654
public function getServiceNamesByType($type)
    {
        if (!$this->hasServices()) {
            return [];
        }
        $types = [];
        $services = $this->getServices();

        foreach ($services as $name => $service) {
            if ($service['type'] !== $type) {
                continue;
            }
            $types[] = $name;
        }

         return $types;
    }