1 | <?php |
||
16 | final class MultiPart implements MultiPartInterface |
||
17 | { |
||
18 | /** |
||
19 | * @var PartInterface |
||
20 | */ |
||
21 | private $decoratedPart; |
||
22 | |||
23 | /** |
||
24 | * @var Boundary |
||
25 | */ |
||
26 | private $boundary; |
||
27 | |||
28 | /** |
||
29 | * @var array|PartInterface[] |
||
30 | */ |
||
31 | private $parts = []; |
||
32 | |||
33 | /** |
||
34 | * @param Boundary $boundary |
||
35 | * @param ContentType $contentType |
||
36 | */ |
||
37 | 30 | public function __construct(Boundary $boundary, ContentType $contentType) |
|
59 | |||
60 | /** |
||
61 | * @return iterable<HeaderInterface> |
||
|
|||
62 | */ |
||
63 | 17 | public function getHeaders(): iterable |
|
67 | |||
68 | /** |
||
69 | * @param string $name |
||
70 | * @return bool |
||
71 | */ |
||
72 | 3 | public function hasHeader(string $name): bool |
|
76 | |||
77 | /** |
||
78 | * @param string $name |
||
79 | * @return HeaderInterface |
||
80 | */ |
||
81 | 20 | public function getHeader(string $name): HeaderInterface |
|
85 | |||
86 | /** |
||
87 | * @param HeaderInterface $header |
||
88 | * @return PartInterface |
||
89 | */ |
||
90 | 1 | public function withHeader(HeaderInterface $header): PartInterface |
|
94 | |||
95 | /** |
||
96 | * @param string $name |
||
97 | * @return PartInterface |
||
98 | */ |
||
99 | 1 | public function withoutHeader(string $name): PartInterface |
|
103 | |||
104 | /** |
||
105 | * @param StreamInterface $body |
||
106 | * @return PartInterface |
||
107 | */ |
||
108 | 1 | public function withBody(StreamInterface $body): PartInterface |
|
112 | |||
113 | /** |
||
114 | * @return StreamInterface |
||
115 | */ |
||
116 | 16 | public function getBody(): StreamInterface |
|
120 | |||
121 | /** |
||
122 | * @return Boundary |
||
123 | */ |
||
124 | 18 | public function getBoundary(): Boundary |
|
128 | |||
129 | /** |
||
130 | * @param PartInterface $part |
||
131 | * @return MultiPartInterface |
||
132 | */ |
||
133 | 17 | public function withPart(PartInterface $part): MultiPartInterface |
|
139 | |||
140 | /** |
||
141 | * @param iterable|PartInterface[] $parts |
||
142 | * @return MultiPartInterface |
||
143 | */ |
||
144 | 7 | public function withParts(iterable $parts): MultiPartInterface |
|
154 | |||
155 | /** |
||
156 | * @return iterable|PartInterface[] |
||
157 | */ |
||
158 | 24 | public function getParts(): iterable |
|
162 | |||
163 | /** |
||
164 | * @param MessageInterface $message |
||
165 | * @return MultiPart |
||
166 | */ |
||
167 | 22 | public static function fromMessage(MessageInterface $message): self |
|
228 | } |
||
229 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.