generated from Nodarx/template
feat: initial version
Signed-off-by: Sebastian Krupinski <root@LAPTOP-7DVOR6NC>
This commit was merged in pull request #1.
This commit is contained in:
30
lib/Client/Protocol/Command/Argument/Store/Flags.php
Normal file
30
lib/Client/Protocol/Command/Argument/Store/Flags.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Gricob\IMAP\Protocol\Command\Argument\Store;
|
||||
|
||||
use Gricob\IMAP\Protocol\Command\Argument\Argument;
|
||||
|
||||
final readonly class Flags implements Argument
|
||||
{
|
||||
/**
|
||||
* @param list<string> $flags
|
||||
*/
|
||||
public function __construct(
|
||||
private array $flags,
|
||||
private string $modifier = '',
|
||||
private bool $silent = true,
|
||||
) {
|
||||
}
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return sprintf(
|
||||
'%sFLAGS%s (%s)',
|
||||
$this->modifier,
|
||||
$this->silent ? '.SILENT' : '',
|
||||
implode(' ', $this->flags),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user