generated from Nodarx/template
fix: entityExtant()
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -298,6 +298,25 @@ class RemoteMailService
|
||||
return $this->entityApplyRange($uids, $range);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine which of the given UIDs exist in a mailbox.
|
||||
*
|
||||
* @return int[] the subset of the given UIDs that exist
|
||||
*/
|
||||
public function entityExtant(string $collection, int ...$uids): array
|
||||
{
|
||||
if ($uids === []) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$this->imapClient()->perform(new SelectCommand($collection, true));
|
||||
|
||||
return $this->imapClient()->perform(new SearchCommand(
|
||||
SearchCriteriaBuilder::create()->uid(SequenceSet::items(...$uids)),
|
||||
IdentifierMode::Uid,
|
||||
))->matches();
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a list of messages in a mailbox matching the given filter, sorted and paginated as requested.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user