获取所有在线uid.

@return array

@throws \Exception
512010
public function coroutineGetAllUids()
    {
        if ($this->isCluster()) {
            return ProcessManager::getInstance()->getRpcCall(ClusterProcess::class)->getAllUids();
        } else {
            $uids = [];
            foreach ($this->uid_fd_table as $key => $value) {
                $uids[] = $key;
            }

            return $uids;
        }
    }
829863
protected function resolveNameID()
    {
        if ($this->name !== null) {
            $name = $this->name;
            $id   = $this->name;
        } elseif ($this->hasModel()) {
            $name = Html::getInputName($this->model, $this->attribute);
            $id   = Html::getInputId($this->model, $this->attribute);
        } else {
            throw new \yii\base\Exception('Class must specify "model" and "attribute" or "name" property values.');
        }
        return [$name, $id];
    }
999294
public function getFileSetIDs()
    {
        $app = Application::getFacadeApplication();
        $db = $app->make(Connection::class);
        $rows = $db->fetchAll('select fsID from FileSetFiles where fID = ?', [$this->getFileID()]);
        $ids = array_map('intval', array_map('array_pop', $rows));

        return $ids;
    }
1246973
protected function getSelectedIds()
    {
        $ids = array();
        foreach ($_REQUEST as $parameter => $value) {
            $matches = array();
            preg_match('/select_(.*)/', $parameter, $matches);
            if ($matches) {
                $ids[] = $matches[1];
            }
        }

        return $ids;
    }
861980
public function getAllRootIds()
    {
        $entityClass = $this->getEntityClass();

        $query  = $this->getObjectManager()->createQuery('SELECT DISTINCT c.root FROM ' . $entityClass . ' c');
        $result = $query->getResult();

        $rootIds = array();
        foreach ($result as $resultArray) {
            $rootIds[] = $resultArray['root'];
        }

        return $rootIds;
    }
372908
public function getAllUids()
    {
        $uids = new Set();
        foreach ($this->map as $node_name => $set) {
            foreach ($set as $value) {
                $uids->add($value);
            }
        }
        return $uids->toArray();
    }
794776
public function getBreadcrumb_uids()
    {
        $breadcrumb_uids = array();
        foreach ($this->getBreadcrumb() as $page) {
            $breadcrumb_uids[] = $page->getUid();
        }

        return array_reverse($breadcrumb_uids);
    }
1066130
public function getDiff()
    {
        $set = $this->getIndexInfo();
        unset($set['_id_1']);

        $present = array();
        $missing = array();

        foreach ($this->config as $index) {
            if ( !isset($index['options']) ) $index['options'] = array();

            $name = $this->generateIndexKeyFromConfig($index);
            if ( isset($set[$name]) ) {
                $present[$name] = $index;
                unset($set[$name]);
            } else {
                $missing[$name] = $index;
            }
        }

        return array(
            'missing' => $missing,
            'present' => $present,
            'unknown' => $set
        );
    }
506762
public function findUidsOfDemoLanguages(): array
    {
        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_language');
        $queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
        $rows = $queryBuilder->select('uid')
            ->from('sys_language')
            ->where(
                $queryBuilder->expr()->eq(
                    'tx_styleguide_isdemorecord',
                    $queryBuilder->createNamedParameter(1, \PDO::PARAM_INT)
                )
            )
            ->execute()
            ->fetchAll();
        $result = [];
        if (is_array($rows)) {
            foreach ($rows as $row) {
                $result[] = $row['uid'];
            }
        }
        return $result;
    }
629888
public function getID()
    {
        $idAttribute = $this->idAttribute;
        return (is_string($idAttribute) && !empty($idAttribute)) ? $this->$idAttribute : null;
    }
294720
public function get_child_ids() {
        $childids = array();
        foreach ($this->items as $child) {
           $childids[] = $child->id;
        }
        return $childids;
    }
642268
public function getIncludeUserIds()
    {
        $ids = [];

        foreach ($this->usersToNotify as $user) {
            $ids[] = $user->getId();
        }

        return $ids;
    }
690380
public function idArray() {
        $data = [];
        foreach ($this->getElements() as $item) $data[] = $item->id;       
        return $data;
    }
993039
public function ids()
    {
        $keyMap = $this->getHandler()->getKeyMap();
        $return = [];
        foreach ($keyMap as $name => $values) {
            $return = array_add($return, $name, $values['id']);
        }
        return $return;
    }
998992
protected function getIDList() : array
    {
        //Get element ID list from cache
        $arElementIDList = $this->getIDListFromCache();
        if (!empty($arElementIDList) && is_array($arElementIDList)) {
            return $arElementIDList;
        }

        $arElementIDList = $this->getIDListFromDB();
        $this->saveIDList($arElementIDList);

        return $arElementIDList;
    }
44459
public function actionDataMenu()
    {
        return [
            'items' => ArrayHelper::typeCast(MenuHelper::getItems()),
            'drafts' => ArrayHelper::typeCast(MenuHelper::getDrafts()),
            'containers' => ArrayHelper::typeCast(MenuHelper::getContainers()),
            'hiddenCats' => ArrayHelper::typeCast(Yii::$app->adminuser->identity->setting->get("togglecat", [])),
        ];
    }
679313
public function getUserinfo($uid = null)
	{
		$ret = array();
		if (extension_loaded('posix')) {
			if (is_null($uid)) {
				$uid = posix_geteuid();	// get effective userid
			} elseif (is_string($uid)) {
				// username passed?
				$ret = posix_getpwnam($uid);
			}
			if (empty($ret)) {
				$ret = posix_getpwuid($uid);
			}
			$ret['group'] = posix_getgrgid($uid_info['gid']);
			unset($ret['gid']);	// is inside group array
		}
		return $ret;
	}