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