Returns a list of sequence IDs.

@param Horde_Imap_Client_Ids $ids  The ID list.

@return array  A list of sequence IDs.
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));
    }
301640
public function getReadRequest($ids)
    {
        $db = $this->_getConnection();
        $table = $this->table;
        $self = $this;
        $primary = $this->_getPrimaryKetArray();

        $request = new StorageDataRequest(
            [$ids],
            function ($ids) use ($db, $table, $self, $primary) {
                if (!$db) {
                    $self->logError('Missing connection on getReadRequest on table: ' . $table);
                    return false;
                }

                $whereLines = [];
                foreach ($ids as $id) {
                    $whereArray = [];
                    $whereBind = $self->prepareBind($self->prepareKey($primary, $id), $db);
                    foreach ($whereBind as $key => $value) {
                        $whereArray[] = $key . ' = ' . $value;
                    }
                    $whereLines[] = implode(' AND ', $whereArray);
                }


                $query = 'SELECT * FROM ' . $table
                    . ' WHERE (' . implode(' ) OR (', $whereLines) . ')';


                $stmnt = $db->query($query);

                if (!$stmnt) {
                    $this->logError('Cannot execute getReadRequest on table: ' . $table . ':' . implode(',', $db->errorInfo()), [
                        'code' => $db->errorCode(),
                    ]);

                    return false;
                }

                $result = $stmnt->fetchAll(PDO::FETCH_ASSOC);

                if (!$result && (int) $stmnt->errorCode() > 0) {
                    $this->logError('Error on execution on getReadRequest on table: ' . $table . ':' . implode(',',
                            $stmnt->errorInfo()), [
                        'code' => $stmnt->errorCode(),
                    ]);

                    return false;
                }

                return $result;
            });

        return $request;
    }
82233
protected function doFetch(array $ids)
    {
        if ( ! $ids) {
            return [];
        }

        return $this->redis->hmget($this->namespace, $this->keys($ids));
    }
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;
	}
244242
protected function _resolveIds($ids)
    {
        if ($ids instanceof Horde_Imap_Client_Ids) {
            return $ids->ids;
        } elseif (is_array($ids)) {
            return $ids;
        } elseif (is_string($ids) || is_integer($ids)) {
            return is_numeric($ids)
                ? array($ids)
                : $this->_fromSequenceString($ids);
        }

        return array();
    }
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);
    }
1056490
public function getVersions(array $ids)
    {
        $result = $this->connection()->post($this->getEndpoint() . '/synchronization', json_encode([
            'ids' => $ids,
        ]));

        return $this->collectionFromResult($result);
    }
893724
protected function _getAttributeItems( $ids )
	{
		$manager = $this->getSubManager( 'attribute' );
		$search = $manager->createSearch();
		$search->setConditions( $search->compare( '==', 'order.base.service.attribute.serviceid', $ids ) );
		$search->setSortations( array( $search->sort( '+', 'order.base.service.attribute.code' ) ) );
		$search->setSlice( 0, 0x7fffffff );

		$result = array();
		foreach ($manager->searchItems( $search ) as $item) {
			$result[ $item->getServiceId() ][ $item->getId() ] = $item;
		}

		return $result;
	}
1261020
public function selectByIds(array $ids = array())
    {
        if (empty($ids)) {
            return array();
        }

        $ids = array_map('intval', $ids);

        $sql = $this->getSelectQueryByIds($ids);

        $resultSet = $this->db->fetchAll($sql);

        return $this->implementVOs($resultSet);
    }
615469
public function getRelatedNodeIds($ids)
    {
        $cols = array(
                'story_object_id' ,
                'story_subject_id',
                'story_comment_id',
                'story_target_id' ,
                'parent_id',
                'owner_id',
        );

        foreach ($cols as $key => $value) {
            $cols[$key] = $value.' IN ('.implode(',', $ids).')';
        }

        $cols = implode(' OR ', $cols);

        //all the nodes ids that are somehow related to deleted nodes
        //possible objects (comments/stories/medium nodes)
        $nids = $this->getService('repos:base.node')
                    ->getQuery()
                    ->disableChain()
                    ->where($cols)->fetchValues('id');

        if (!empty($nids)) {
            $story_ids = $this->getService('repos:stories.story')->getQuery()->disableChain()->where(array('object.id' => $nids))->fetchValues('id');
            $nids = array_merge($nids, $story_ids);

            //if there are any medium nodes in the related nodes
            //check if they have any comments
            $comment_ids = $this->getService('repos:base.comment')->getQuery()->disableChain()->where(array('parent.id' => $nids))->fetchValues('id');
            $nids = array_merge($nids, $comment_ids);
        }

        return array_unique($nids);
    }
669815
public function getMany(array $ids) {
		$result = $this->getBackend()->getMany($ids);
		
		if (! empty($result)) {
			return array_map('json_decode', $result);
		}
		
		return $result;
	}
1227142
protected function generatekeys($ids, $prefix) {
		$keys = array();
		foreach ($ids as $id) {
			$keys[$id] = $prefix . $id;
		}
		return $keys;
	}
401490
public function getByIds(array $ids)
    {
        if (empty($ids)) {
            return null;
        }

        $parameters = array(
            'api_action' => 'list_list',
            'ids' => implode(',', $ids)
        );

        $response = $this->request($parameters);

        if ($response === null || $response->getStatusCode() !== 200) {
            return null;
        }

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

        return $this->serializer->deserialize(
            $this->removeResultInformation($json),
            'array<integer, ' . \FondOfPHP\ActiveCampaign\DataTransferObject\MailingList::class . '>',
            'json'
        );
    }
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;
    }
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();
    }
301671
protected function findObjects(array $ids)
    {
        $foundObjects = $this->domain->getRepository()->findBy([
            $this->identifier => array_unique($ids),
        ]);
        $mapFinds = [];
        $objects = [];

        foreach ($foundObjects as $foundObject) {
            $id = $this->propertyAccessor->getValue($foundObject, $this->identifier);
            $mapFinds[$id] = $foundObject;
        }

        foreach ($ids as $i => $id) {
            $objects[$i] = $mapFinds[$id]
                ?? $this->domain->newInstance($this->defaultValueOptions);
        }

        return $objects;
    }
391006
public function getReadRequest($ids)
    {
        $self = $this;
        $request = new StorageDataRequest(
            [$ids],
            function ($ids) use ($self) {
                $results = [];
                foreach ($ids as $id) {
                    $pointer = $self->getPointer($id);
                    if ($pointer) {
                        $record = json_decode(stream_get_contents($pointer), true);
                        if (isset($record[self::F_DATA])) {
                            $results[$id] = $record[self::F_DATA] + [$this->primaryKey => $id];
                        }
                        $self->closePointer($pointer);
                    } else {
                        $results[$id] = null;
                    }
                }
                
                return $results;
            }
        );
    
        return $request;
    }