Get results ids.
@param  bool $merge
@return array
963099
public final function getResultsIds(bool $merge = true): array
    {
        $return = [];
        if (!empty($this->results)) {
            if ($merge) {
                foreach ($this->results as $result) {
                    $return = array_merge($return, $result->getIds());
                }
            } else {
                foreach ($this->results as $result) {
                    $return[] = $result->getIds();
                }
            }
        }

        return $return;
    }
1134124
public function getSellerIds()
    {
        $sellerIds = array();

        foreach ($this->getOrders() as $order)
        {
            $sellerIds[] = $order->getSeller()->getId();
        }

        return $sellerIds;
    }
844136
private function _userids($users)
	{
		$db = \App::get('db');

		if (empty($db))
		{
			return false;
		}

		$usernames = array();
		$userids = array();

		if (!is_array($users))
		{
			$users = array($users);
		}

		foreach ($users as $u)
		{
			if (is_numeric($u))
			{
				$userids[] = $u;
			}
			else
			{
				$usernames[] = $db->quote($u);
			}
		}

		if (empty($usernames))
		{
			return $userids;
		}

		$set = implode($usernames, ",");

		$sql = "SELECT id FROM `#__users` WHERE username IN ($set);";

		$db->setQuery($sql);

		$result = $db->loadColumn();

		if (empty($result))
		{
			$result = array();
		}

		$result = array_merge($result, $userids);

		return $result;
	}
1310244
protected function getIds( $request )
	{
		$ids = [];

		if( isset( $request->data ) )
		{
			foreach( (array) $request->data as $entry )
			{
				if( isset( $entry->id ) ) {
					$ids[] = $entry->id;
				}
			}
		}

		return $ids;
	}
203100
public function getMergedBranches($ref = 'HEAD', $remote = false, $dir = null, $mustRun = false)
    {
        $args = ['branch', '--list', '--no-column', '--no-color', '--merged', $ref];
        if ($remote) {
            $args[] = '--remote';
        }
        $mergedBranches = $this->execute($args, $dir, $mustRun);
        $array = array_map(
            function ($element) {
                return trim($element, ' *');
            },
            explode("\n", $mergedBranches)
        );

        return $array;
    }
518170
public static function merge(): array
    {
        $arguments = [];
        foreach (func_get_args() as $key => $val) {
            if (!Any::isArray($val)) {
                $val = [];
            }

            $arguments[$key] = $val;
        }
        return call_user_func_array('array_merge', $arguments);
    }
173338
protected function getRules($action, $merge = null)
	{
		$method = 'get' . ucfirst($action) . 'Rules';

		if (method_exists($this, $method)) {
			$rules = $this->$method();
		} else {
			$rules = [];
		}

		if ($merge === null) {
			$merge = $this->merge;
		}

		if ($merge) {
			$rules = array_merge_recursive($this->getCommonRules(), $rules);
		}

		return $rules;
	}
397879
protected function getAttributes(array $merge = [])
    {
        return array_merge([
            'prefix'     => $this->prefix,
            'as'         => $this->routeName,
            'middleware' => $this->middlewares,
            'namespace'  => $this->namespace,
        ], $merge);
    }
381106
public function callIds()
    {
      $call_ids = array();	

      foreach ($this->calls as $call)
        $call_ids[] = $call->id;

      return $call_ids;
    }
910076
public function getMergedVendorInfo(VendorInfo $merge)
    {
        $newParams = array_merge($this->getParameters(), $merge->getParameters());
        $newInfo = new VendorInfo($this->getType());
        $newInfo->setParameters($newParams);

        return $newInfo;
    }
803141
public function getIds()
    {
        $idsString = $this->getRequest()->get('ids');

        return (null !== $idsString) ? array_filter(explode(',', $idsString)) : null;
    }
264883
protected function mergeValues(array $values, $merge = true)
    {
        $this->values = $merge ? array_merge($this->values, $values) : $values;
        return $this;
    }
617618
protected function getIDListFromCache() : array
    {
        $arCacheTags = $this->getCacheTagList();
        $sCacheKey = $this->getCacheKey();

        $arElementIDList  = (array) CCache::get($arCacheTags, $sCacheKey);

        return $arElementIDList;
    }
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;
    }
1152679
public function findByIds($ids)
    {
        if (!is_array($ids)) {
            $ids = explode(',', $ids);
        }

        if (!$ids) {
            return [];
        }

        return $this->createValuedQueryBuilder('c')
            ->andWhere('c.id IN (:ids)')->setParameter('ids', $ids)
            ->andWhere('c.deletedAt IS NULL')
            ->andWhere('c.active = :active')
            ->andWhere('c.layout = :layout')
            ->andWhere('c.publishAt < :now OR c.publishAt IS NULL')->setParameter('now', new \DateTime())
            ->setParameter('active', true)
            ->setParameter('layout', false)
            ->getQuery()
            ->useResultCache(true, self::CACHE_TTL)
            ->getResult();
    }
1103740
public function getIds(): iterable
    {
        $this->checkRepository();

        $primaryKey  = $this->getClassMetadata()->getSingleIdentifierFieldName();

        $result = $this->_em
            ->createQueryBuilder()
            ->select('entity.'.$primaryKey)
            ->from($this->_entityName, 'entity')
            ->getQuery()
            ->getResult(Query::HYDRATE_ARRAY)
        ;

        $array = [];

        foreach ($result as $id) {
            $array[] = $id[$primaryKey];
        }

        return $array;
    }
1099047
public function getAllIds(): array
    {
        $result = [];
        foreach ($this->getExported() as $entity) {
            $result[$entity->getId()] = $entity;

            foreach ($entity->getExportChildren() as $child) {
                $result[$child->getId()] = $child;
            }
        }
        return array_keys($result);
    }