generated from Nodarx/template
feat: speed improvements
Signed-off-by: Sebastian Krupinski <root@LAPTOP-7DVOR6NC>
This commit is contained in:
15
lib/Client/Protocol/Command/Argument/Search/Body.php
Normal file
15
lib/Client/Protocol/Command/Argument/Search/Body.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Gricob\IMAP\Protocol\Command\Argument\Search;
|
||||
|
||||
final readonly class Body implements Criteria
|
||||
{
|
||||
public function __construct(private string $value) {}
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return 'BODY "' . str_replace(['"', '\\'], ['\\"', '\\\\'], $this->value) . '"';
|
||||
}
|
||||
}
|
||||
13
lib/Client/Protocol/Command/Argument/Search/Flagged.php
Normal file
13
lib/Client/Protocol/Command/Argument/Search/Flagged.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Gricob\IMAP\Protocol\Command\Argument\Search;
|
||||
|
||||
final readonly class Flagged implements Criteria
|
||||
{
|
||||
public function __toString(): string
|
||||
{
|
||||
return 'FLAGGED';
|
||||
}
|
||||
}
|
||||
15
lib/Client/Protocol/Command/Argument/Search/From.php
Normal file
15
lib/Client/Protocol/Command/Argument/Search/From.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Gricob\IMAP\Protocol\Command\Argument\Search;
|
||||
|
||||
final readonly class From implements Criteria
|
||||
{
|
||||
public function __construct(private string $value) {}
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return 'FROM "' . str_replace(['"', '\\'], ['\\"', '\\\\'], $this->value) . '"';
|
||||
}
|
||||
}
|
||||
15
lib/Client/Protocol/Command/Argument/Search/Larger.php
Normal file
15
lib/Client/Protocol/Command/Argument/Search/Larger.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Gricob\IMAP\Protocol\Command\Argument\Search;
|
||||
|
||||
final readonly class Larger implements Criteria
|
||||
{
|
||||
public function __construct(private int $size) {}
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return 'LARGER ' . $this->size;
|
||||
}
|
||||
}
|
||||
13
lib/Client/Protocol/Command/Argument/Search/Seen.php
Normal file
13
lib/Client/Protocol/Command/Argument/Search/Seen.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Gricob\IMAP\Protocol\Command\Argument\Search;
|
||||
|
||||
final readonly class Seen implements Criteria
|
||||
{
|
||||
public function __toString(): string
|
||||
{
|
||||
return 'SEEN';
|
||||
}
|
||||
}
|
||||
15
lib/Client/Protocol/Command/Argument/Search/Smaller.php
Normal file
15
lib/Client/Protocol/Command/Argument/Search/Smaller.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Gricob\IMAP\Protocol\Command\Argument\Search;
|
||||
|
||||
final readonly class Smaller implements Criteria
|
||||
{
|
||||
public function __construct(private int $size) {}
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return 'SMALLER ' . $this->size;
|
||||
}
|
||||
}
|
||||
15
lib/Client/Protocol/Command/Argument/Search/Subject.php
Normal file
15
lib/Client/Protocol/Command/Argument/Search/Subject.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Gricob\IMAP\Protocol\Command\Argument\Search;
|
||||
|
||||
final readonly class Subject implements Criteria
|
||||
{
|
||||
public function __construct(private string $value) {}
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return 'SUBJECT "' . str_replace(['"', '\\'], ['\\"', '\\\\'], $this->value) . '"';
|
||||
}
|
||||
}
|
||||
15
lib/Client/Protocol/Command/Argument/Search/To.php
Normal file
15
lib/Client/Protocol/Command/Argument/Search/To.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Gricob\IMAP\Protocol\Command\Argument\Search;
|
||||
|
||||
final readonly class To implements Criteria
|
||||
{
|
||||
public function __construct(private string $value) {}
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return 'TO "' . str_replace(['"', '\\'], ['\\"', '\\\\'], $this->value) . '"';
|
||||
}
|
||||
}
|
||||
13
lib/Client/Protocol/Command/Argument/Search/Unflagged.php
Normal file
13
lib/Client/Protocol/Command/Argument/Search/Unflagged.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Gricob\IMAP\Protocol\Command\Argument\Search;
|
||||
|
||||
final readonly class Unflagged implements Criteria
|
||||
{
|
||||
public function __toString(): string
|
||||
{
|
||||
return 'UNFLAGGED';
|
||||
}
|
||||
}
|
||||
13
lib/Client/Protocol/Command/Argument/Search/Unseen.php
Normal file
13
lib/Client/Protocol/Command/Argument/Search/Unseen.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Gricob\IMAP\Protocol\Command\Argument\Search;
|
||||
|
||||
final readonly class Unseen implements Criteria
|
||||
{
|
||||
public function __toString(): string
|
||||
{
|
||||
return 'UNSEEN';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user