-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTextMessage.php
More file actions
53 lines (45 loc) · 1.2 KB
/
TextMessage.php
File metadata and controls
53 lines (45 loc) · 1.2 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
declare(strict_types=1);
/**
* This file is part of friendsofhyperf/components.
*
* @link https://github.com/friendsofhyperf/components
* @document https://github.com/friendsofhyperf/components/blob/main/README.md
* @contact [email protected]
*/
namespace FriendsOfHyperf\Mail;
use FriendsOfHyperf\Mail\Contract\Attachable;
use Hyperf\Support\Traits\ForwardsCalls;
/**
* @mixin Message
*/
class TextMessage
{
use ForwardsCalls;
public function __construct(
protected Message $message
) {
}
/**
* Dynamically pass missing methods to the underlying message instance.
*/
public function __call(string $method, array $parameters): mixed
{
$result = $this->forwardCallTo($this->message, $method, $parameters);
return $result === $this->message ? $this : $result;
}
/**
* Embed a file in the message and get the CID.
*/
public function embed(string|Attachable|Attachment $file): string
{
return '';
}
/**
* Embed in-memory data in the message and get the CID.
*/
public function embedData(mixed $data, string $name, ?string $contentType = null): string
{
return '';
}
}