Returns array of contacts by ids.

@param array $ids

@return array
765048
private function findContactsByIds($ids)
    {
        if (0 === count($ids)) {
            return [];
        }

        $queryBuilder = $this->entityManager->createQueryBuilder()
            ->select('CONCAT(\'c\', c.id) AS id, CONCAT(CONCAT(c.firstName, \' \'), c.lastName) AS name')
            ->from($this->contactEntityClass, 'c')
            ->where('c.id IN (:ids)');

        $query = $queryBuilder->getQuery();
        $query->setParameter('ids', $ids);

        return $query->getArrayResult();
    }
841468
public function findByIds($ids)
    {
        if (!is_array($ids)) {
            $ids = explode(',', $ids);
        }

        return $this->createQueryBuilder('ml')
            ->andWhere('ml.id IN (:ids)')
            ->setParameter('ids', $ids)
            ->getQuery()
            ->getResult();
    }
451322
public function getMany(array $ids) {
		$event  = $this->getProfiler()->startRead('Get (' . count($ids) . '): ' . implode(', ', $ids));
		$result = $this->getBackend()->getMany($ids);
		
		if (empty($result)) {
			$event->stopNotice();
		} else {
			$event->stopSuccess();
		}
		
		return $result;
	}
719106
protected function getLr($ids)
    {
        $class = $this->className;
        return $class::find()
            ->select(['id', $this->leftAttribute, $this->rightAttribute])
            ->where(['id' => $ids])
            ->indexBy('id')
            ->asArray(true)
            ->all();
    }
523149
public function getByIds(array $ids, array $params = [])
    {
        return $this->executeRequest(
            RequestMethodEnum::GET,
            ResourceMethodEnum::GET_BY_IDS,
            $params,
            $ids
        );
    }
102324
public function getLists($ids = null, $args = array(), $returnRaw = false)
    {
        if ($ids) {
            $args['id'] = $ids;
        }

        return $this->getResult('getLists', $args, is_array($ids), $returnRaw);
    }
1169443
public function idsToMongo(array $ids)
    {
        foreach ($ids as &$id) {
            $id = $this->idToMongo($id);
        }

        return $ids;
    }
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();
    }
703647
protected function load(array $ids = array())
    {
        $idsNotFound = array_filter($ids);

        $output = array();

        $stores = $this->stores;

        foreach ($this->stores as $storeName => $store) {
            if (!empty($idsNotFound)) {
                $objects = $store->load($idsNotFound);

                $loadedKeys = array_keys($objects);
                $remainingKeys = array_values(array_diff($idsNotFound, $loadedKeys));
                $idsNotFound = $remainingKeys;
                $output = $output + $objects;

                if (!empty($objects) && $store == $this->primaryStore) {
                    foreach ($stores as $storeName2 => $store2) {
                        if ($storeName2 !== $storeName) {
                            $ret = $store2->saveMulti($objects);
                        }
                    }
                }
            }
        }


        return $output;
    }
571267
protected function get_next_id($ids) {
        $maxid = 0;
        foreach ($ids as $id) {
            if (preg_match('/^NEWID(\d+)$/', $id, $matches) && ((int)$matches[1]) > $maxid) {
                $maxid = (int)$matches[1];
            }
        }
        return 'NEWID'.($maxid+1);
    }
1179807
public function findByIds($ids)
    {
        if (!is_array($ids)) {
            $ids = explode(',', $ids);
        }

        $items = $this->createValuedQueryBuilder('c')
            ->andWhere('c.id IN (:ids)')->setParameter('ids', $ids)
            ->andWhere('c.deletedAt IS NULL')
            ->getQuery()->useResultCache(true, self::CACHE_TTL)->getResult();

        return $this->sortByArray($items, $ids);
    }
507280
public function findByIds(array $ids)
    {
        $entities = [];

        for ($i = 0; $i < count($this->registries); $i++) {
            /** @var RegistryInterface $registry */
            $registry = $this->registries[ $i ];
            $found = $registry->findByKeys($ids);
            $entities = array_merge($entities, $found);

            $this->updateRegistries($found, $i - 1);

            if (count($entities) === count($ids)) {
                break;
            }
        }

        return $entities;
    }
847100
protected function getPages($ids)
    {
        // Check empty set
        if (empty($ids)) {
            return new ArrayList();
        }

        $recordClass = $this->recordClass;

        // Bypass translatable filter
        if (class_exists('Translatable') && $recordClass::has_extension('Translatable')) {
            Translatable::disable_locale_filter();
        }

        // Bypass versioned filter
        if ($recordClass::has_extension(Versioned::class)) {
            // Workaround for get_including_deleted not supporting byIDs filter very well
            // Ensure we select both stage / live records
            $pages = Versioned::get_including_deleted($recordClass)->byIDs($ids);
        } else {
            $pages = DataObject::get($recordClass)->byIDs($ids);
        }

        if (class_exists('Translatable') && $recordClass::has_extension('Translatable')) {
            Translatable::enable_locale_filter();
        }

        return $pages;
    }
350365
protected function _getSeqIds(Horde_Imap_Client_Ids $ids)
    {
        if (!count($ids)) {
            $status = $this->status($this->_selected, Horde_Imap_Client::STATUS_MESSAGES);
            return range(1, $status['messages']);
        } elseif ($ids->sequence) {
            return $ids->ids;
        }

        return array_keys(array_intersect($this->_pop3Cache('uidl'), $ids->ids));
    }
1199922
public function remove($ids = [])
    {
        if (!is_array($ids)) {
            $ids = [$ids];
        }

        $result = $this->request(
            'POST',
            $this->getCore() . '/update/json',
            [],
            [
                'delete' => $ids
            ]
        );

        if ($this->isAutoCommit()) {
            $this->commit();
        }

        return $result;
    }
1247866
public function getListByRequestIds($ids)
    {
        $parts = [];
        foreach ($ids as $id) {
            $parts[] = 'request.id:' . $id;
        }
        $qp = new QueryParams();
        $qp->query = join(' OR ', $parts);
        return $this->getList($qp);
    }
992819
public static function findByIds($ids, $throwException = true)
    {
        $ids = array_unique($ids);
        $ids = array_map('intval', $ids);
        $ids2find = array_diff($ids, array_keys(static::$identityMap));
        if (count($ids2find) > 0) {
            Property::find()->where(['in', 'id', $ids2find])->all();
        }

        return array_reduce(
            $ids,
            function ($carry, $id) use ($throwException) {
                if (isset(static::$identityMap[$id])) {
                    $carry[$id] = static::$identityMap[$id];
                } elseif ($throwException) {
                    throw new \RuntimeException("Property $id not found");
                }
                return $carry;
            },
            []
        );
    }