Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | /** |
3 | * Pop PHP Framework (http://www.popphp.org/) |
4 | * |
5 | * @link https://github.com/popphp/popphp-framework |
6 | * @author Nick Sagona, III <dev@nolainteractive.com> |
7 | * @copyright Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com) |
8 | * @license http://www.popphp.org/license New BSD License |
9 | */ |
10 | |
11 | /** |
12 | * @namespace |
13 | */ |
14 | namespace Pop\Mail\Message; |
15 | |
16 | /** |
17 | * Mail message interface |
18 | * |
19 | * @category Pop |
20 | * @package Pop\Mail |
21 | * @author Nick Sagona, III <dev@nolainteractive.com> |
22 | * @copyright Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com) |
23 | * @license http://www.popphp.org/license New BSD License |
24 | * @version 4.0.0 |
25 | */ |
26 | interface MessageInterface |
27 | { |
28 | |
29 | /** |
30 | * Add header |
31 | * |
32 | * @param string $header |
33 | * @param string $value |
34 | * @return MessageInterface |
35 | */ |
36 | public function addHeader(string $header, string $value): MessageInterface; |
37 | |
38 | /** |
39 | * Add headers |
40 | * |
41 | * @param array $headers |
42 | * @return MessageInterface |
43 | */ |
44 | public function addHeaders(array $headers): MessageInterface; |
45 | |
46 | /** |
47 | * Determine if message has header |
48 | * |
49 | * @param string $header |
50 | * @return bool |
51 | */ |
52 | public function hasHeader(string $header): bool; |
53 | |
54 | /** |
55 | * Get header |
56 | * |
57 | * @param string $header |
58 | * @return string |
59 | */ |
60 | public function getHeader(string $header): ?string; |
61 | |
62 | /** |
63 | * Get all headers |
64 | * |
65 | * @return array |
66 | */ |
67 | public function getHeaders(): array; |
68 | |
69 | /** |
70 | * Get header as string |
71 | * |
72 | * @param string $header |
73 | * @return string|null |
74 | */ |
75 | public function getHeaderAsString(string $header): string|null; |
76 | |
77 | /** |
78 | * Get all headers as string |
79 | * |
80 | * @param array $omitHeaders |
81 | * @return string|null |
82 | */ |
83 | public function getHeadersAsString(array $omitHeaders = []): string|null; |
84 | |
85 | /** |
86 | * Get content type |
87 | * |
88 | * @return ?string |
89 | */ |
90 | public function getContentType(): ?string; |
91 | |
92 | /** |
93 | * Get character set |
94 | * |
95 | * @return ?string |
96 | */ |
97 | public function getCharSet(): ?string; |
98 | |
99 | /** |
100 | * Get body |
101 | * |
102 | * @return ?string |
103 | */ |
104 | public function getBody(): ?string; |
105 | |
106 | /** |
107 | * Set content type |
108 | * |
109 | * @param string $contentType |
110 | * @return MessageInterface |
111 | */ |
112 | public function setContentType(string $contentType): MessageInterface; |
113 | |
114 | /** |
115 | * Set character set |
116 | * |
117 | * @param string $charSet |
118 | * @return MessageInterface |
119 | */ |
120 | public function setCharSet(string $charSet): MessageInterface; |
121 | |
122 | /** |
123 | * Render |
124 | * |
125 | * @return string |
126 | */ |
127 | public function render(): string; |
128 | |
129 | /** |
130 | * Render as an array of lines |
131 | * |
132 | * @return array |
133 | */ |
134 | public function renderAsLines(): array; |
135 | |
136 | /** |
137 | * Render to string |
138 | * |
139 | * @return string |
140 | */ |
141 | public function __toString(): string; |
142 | |
143 | } |