generated from Nodarx/template
feat: initial version
Signed-off-by: Sebastian Krupinski <root@LAPTOP-7DVOR6NC>
This commit is contained in:
16
lib/Client/Protocol/Response/Line/Data/Fetch/Address.php
Normal file
16
lib/Client/Protocol/Response/Line/Data/Fetch/Address.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Gricob\IMAP\Protocol\Response\Line\Data\Fetch;
|
||||
|
||||
final readonly class Address
|
||||
{
|
||||
public function __construct(
|
||||
public ?string $displayName,
|
||||
public ?string $atDomainList,
|
||||
public ?string $mailboxName,
|
||||
public ?string $hostName,
|
||||
) {
|
||||
}
|
||||
}
|
||||
12
lib/Client/Protocol/Response/Line/Data/Fetch/BodySection.php
Normal file
12
lib/Client/Protocol/Response/Line/Data/Fetch/BodySection.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Gricob\IMAP\Protocol\Response\Line\Data\Fetch;
|
||||
|
||||
final readonly class BodySection
|
||||
{
|
||||
public function __construct(public string $section, public string $text)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Gricob\IMAP\Protocol\Response\Line\Data\Fetch;
|
||||
|
||||
use Gricob\IMAP\Protocol\Response\Line\Data\Fetch\BodyStructure\Part;
|
||||
|
||||
class BodyStructure
|
||||
{
|
||||
public function __construct(
|
||||
public Part $part,
|
||||
) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Gricob\IMAP\Protocol\Response\Line\Data\Fetch\BodyStructure;
|
||||
|
||||
final readonly class Disposition
|
||||
{
|
||||
/**
|
||||
* @param array<string, string> $attributes
|
||||
*/
|
||||
public function __construct(
|
||||
public string $type,
|
||||
public array $attributes,
|
||||
) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace Gricob\IMAP\Protocol\Response\Line\Data\Fetch\BodyStructure;
|
||||
|
||||
use Gricob\IMAP\Protocol\Response\Line\Data\Fetch\BodyStructure;
|
||||
use Gricob\IMAP\Protocol\Response\Line\Data\Fetch\Envelope;
|
||||
|
||||
readonly class MessagePart extends SinglePart
|
||||
{
|
||||
/**
|
||||
* @param array<string, string> $attributes
|
||||
* @param string[]|null $language
|
||||
*/
|
||||
public function __construct(
|
||||
array $attributes,
|
||||
?string $id,
|
||||
?string $description,
|
||||
string $encoding,
|
||||
int $size,
|
||||
public Envelope $envelope,
|
||||
public BodyStructure $bodyStructure,
|
||||
public int $textLines,
|
||||
?string $md5,
|
||||
?Disposition $disposition,
|
||||
?array $language,
|
||||
?string $location,
|
||||
) {
|
||||
parent::__construct(
|
||||
'MESSAGE',
|
||||
'RFC822',
|
||||
$attributes,
|
||||
$id,
|
||||
$description,
|
||||
$encoding,
|
||||
$size,
|
||||
$md5,
|
||||
$disposition,
|
||||
$language,
|
||||
$location,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Gricob\IMAP\Protocol\Response\Line\Data\Fetch\BodyStructure;
|
||||
|
||||
final readonly class MultiPart extends Part
|
||||
{
|
||||
/**
|
||||
* @param array<string,string> $attributes
|
||||
* @param string[] $language
|
||||
* @param list<Part> $parts
|
||||
*/
|
||||
public function __construct(
|
||||
string $subtype,
|
||||
array $attributes,
|
||||
public array $parts,
|
||||
public ?Disposition $disposition,
|
||||
public ?array $language,
|
||||
public ?string $location,
|
||||
) {
|
||||
parent::__construct('MULTIPART', $subtype, $attributes);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Gricob\IMAP\Protocol\Response\Line\Data\Fetch\BodyStructure;
|
||||
|
||||
abstract readonly class Part
|
||||
{
|
||||
/**
|
||||
* @param array<string,string> $attributes
|
||||
*/
|
||||
public function __construct(
|
||||
public string $type,
|
||||
public string $subtype,
|
||||
public array $attributes,
|
||||
) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Gricob\IMAP\Protocol\Response\Line\Data\Fetch\BodyStructure;
|
||||
|
||||
readonly class SinglePart extends Part
|
||||
{
|
||||
/**
|
||||
* @param array<string,string> $attributes
|
||||
* @param string[]|null $language
|
||||
*/
|
||||
public function __construct(
|
||||
string $type,
|
||||
string $subtype,
|
||||
array $attributes,
|
||||
public ?string $id,
|
||||
public ?string $description,
|
||||
public string $encoding,
|
||||
public int $size,
|
||||
public ?string $md5,
|
||||
public ?Disposition $disposition,
|
||||
public ?array $language,
|
||||
public ?string $location,
|
||||
) {
|
||||
parent::__construct($type, $subtype, $attributes);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Gricob\IMAP\Protocol\Response\Line\Data\Fetch\BodyStructure;
|
||||
|
||||
final readonly class TextPart extends SinglePart
|
||||
{
|
||||
/**
|
||||
* @param array<string, string> $attributes
|
||||
* @param string[]|null $language
|
||||
*/
|
||||
public function __construct(
|
||||
string $subtype,
|
||||
array $attributes,
|
||||
?string $id,
|
||||
?string $description,
|
||||
string $encoding,
|
||||
int $size,
|
||||
public int $textLines,
|
||||
?string $md5,
|
||||
?Disposition $disposition,
|
||||
?array $language,
|
||||
?string $location,
|
||||
) {
|
||||
parent::__construct(
|
||||
'TEXT',
|
||||
$subtype,
|
||||
$attributes,
|
||||
$id,
|
||||
$description,
|
||||
$encoding,
|
||||
$size,
|
||||
$md5,
|
||||
$disposition,
|
||||
$language,
|
||||
$location,
|
||||
);
|
||||
}
|
||||
}
|
||||
32
lib/Client/Protocol/Response/Line/Data/Fetch/Envelope.php
Normal file
32
lib/Client/Protocol/Response/Line/Data/Fetch/Envelope.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Gricob\IMAP\Protocol\Response\Line\Data\Fetch;
|
||||
|
||||
use DateTimeImmutable;
|
||||
|
||||
final readonly class Envelope
|
||||
{
|
||||
/**
|
||||
* @param Address[]|null $from
|
||||
* @param Address[]|null $sender
|
||||
* @param Address[]|null $replyTo
|
||||
* @param Address[]|null $to
|
||||
* @param Address[]|null $cc
|
||||
* @param Address[]|null $bcc
|
||||
*/
|
||||
public function __construct(
|
||||
public ?DateTimeImmutable $date,
|
||||
public ?string $subject,
|
||||
public ?array $from,
|
||||
public ?array $sender,
|
||||
public ?array $replyTo,
|
||||
public ?array $to,
|
||||
public ?array $cc,
|
||||
public ?array $bcc,
|
||||
public ?string $inReplyTo,
|
||||
public ?string $messageId,
|
||||
) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user