-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathAttachment.php
More file actions
40 lines (34 loc) · 845 Bytes
/
Attachment.php
File metadata and controls
40 lines (34 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
namespace Utopia\Messaging\Messages\Email;
class Attachment
{
/**
* @param string $name The name of the file.
* @param string $path The path of the file.
* @param string $type The MIME type of the file.
* @param ?string $content Raw string content of the file (used instead of path when non-null).
*/
public function __construct(
private string $name,
private string $path,
private string $type,
private ?string $content = null,
) {
}
public function getName(): string
{
return $this->name;
}
public function getPath(): string
{
return $this->path;
}
public function getType(): string
{
return $this->type;
}
public function getContent(): ?string
{
return $this->content;
}
}