-
Notifications
You must be signed in to change notification settings - Fork 9.4k
/
Copy pathMimePartInterface.php
133 lines (116 loc) · 2.5 KB
/
MimePartInterface.php
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Framework\Mail;
/**
* Interface representing a MIME part.
*/
interface MimePartInterface
{
/**
* Get type
*
* @return string
*/
public function getType(): string;
/**
* Get encoding
*
* @return string
*/
public function getEncoding(): string;
/**
* Get disposition
*
* @return string
*/
public function getDisposition(): string;
/**
* Get description
*
* @return string
*/
public function getDescription(): string;
/**
* Get filename
*
* @return string
*/
public function getFileName(): string;
/**
* Get charset
*
* @return string
*/
public function getCharset(): string;
/**
* Get boundary
*
* @return string
*/
public function getBoundary(): string;
/**
* Get location
*
* @return string
*/
public function getLocation(): string;
/**
* Get language
*
* @return string
*/
public function getLanguage(): string;
/**
* Get Filters
*
* @return array
*/
public function getFilters(): array;
/**
* Check if this part can be read as a stream
*
* @return bool
*/
public function isStream(): bool;
/**
* If this was created with a stream, return a filtered stream for reading the content. Useful for file attachment
*
* @param string $endOfLine
*
* @return resource
*/
public function getEncodedStream($endOfLine = MimeInterface::LINE_END);
/**
* Get the Content of the current Mime Part in the given encoding.
*
* @param string $endOfLine
*
* @return string|resource
*/
public function getContent($endOfLine = MimeInterface::LINE_END);
/**
* Get the RAW unencoded content from this part
*
* @return string
*/
public function getRawContent(): string;
/**
* Create and return the array of headers for this MIME part
*
* @param string $endOfLine
*
* @return array
*/
public function getHeadersArray($endOfLine = MimeInterface::LINE_END): array;
/**
* Create and return the array of headers for this MIME part
*
* @param string $endOfLine
*
* @return string
*/
public function getHeaders($endOfLine = MimeInterface::LINE_END): string;
}