generated from Nodarx/template
refactor: use custom imap client
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
36
lib/Client/Command/Result/SearchResult.php
Normal file
36
lib/Client/Command/Result/SearchResult.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace KTXM\ProviderImap\Client\Command\Result;
|
||||
|
||||
use KTXM\ProviderImap\Client\IdentifierMode;
|
||||
|
||||
final class SearchResult
|
||||
{
|
||||
/**
|
||||
* @param list<int> $matches
|
||||
*/
|
||||
public function __construct(
|
||||
private readonly array $matches,
|
||||
private readonly IdentifierMode $identifierMode,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @return list<int>
|
||||
*/
|
||||
public function matches(): array
|
||||
{
|
||||
return $this->matches;
|
||||
}
|
||||
|
||||
public function identifierMode(): IdentifierMode
|
||||
{
|
||||
return $this->identifierMode;
|
||||
}
|
||||
|
||||
public function isUidSearch(): bool
|
||||
{
|
||||
return $this->identifierMode === IdentifierMode::Uid;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user