feat: initial version

Signed-off-by: Sebastian Krupinski <root@LAPTOP-7DVOR6NC>
This commit was merged in pull request #1.
This commit is contained in:
Sebastian Krupinski
2026-02-20 16:41:19 -05:00
committed by Sebastian Krupinski
parent a313767846
commit e51c65bf19
139 changed files with 11256 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
namespace Gricob\IMAP\Mime\Part;
abstract readonly class Part
{
public string $type;
public string $subtype;
/**
* @var array<string, string>
*/
public array $attributes;
/**
* @param array<string,string> $attributes
*/
public function __construct(
string $type,
string $subtype,
array $attributes,
) {
$this->subtype = strtolower($subtype);
$this->type = strtolower($type);
$this->attributes = $attributes;
}
abstract public function findPartByMimeType(string $mimeType): ?SinglePart;
public function mimeType(): string
{
return $this->type.'/'.$this->subtype;
}
}