1 | <?php |
||
13 | final class ResourceAttachment implements PartInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var PartInterface |
||
17 | */ |
||
18 | private $decoratedPart; |
||
19 | |||
20 | /** |
||
21 | * @param resource $resource |
||
22 | * @param string $filename |
||
23 | * @param ContentType $contentType |
||
24 | */ |
||
25 | 8 | public function __construct($resource, string $filename, ContentType $contentType) |
|
37 | |||
38 | /** |
||
39 | * @param string $string |
||
40 | * @param string $filename |
||
41 | * @param ContentType $contentType |
||
42 | * @return ResourceAttachment |
||
43 | */ |
||
44 | 8 | public static function fromString(string $string, string $filename, ContentType $contentType) |
|
54 | |||
55 | /** |
||
56 | * @return iterable<HeaderInterface> |
||
|
|||
57 | */ |
||
58 | 6 | public function getHeaders(): iterable |
|
62 | |||
63 | /** |
||
64 | * @param string $name |
||
65 | * @return bool |
||
66 | */ |
||
67 | public function hasHeader(string $name): bool |
||
71 | |||
72 | /** |
||
73 | * @param string $name |
||
74 | * @return HeaderInterface |
||
75 | */ |
||
76 | 8 | public function getHeader(string $name): HeaderInterface |
|
80 | |||
81 | /** |
||
82 | * @param HeaderInterface $header |
||
83 | * @return PartInterface |
||
84 | */ |
||
85 | public function withHeader(HeaderInterface $header): PartInterface |
||
91 | |||
92 | /** |
||
93 | * @param string $name |
||
94 | * @return PartInterface |
||
95 | */ |
||
96 | public function withoutHeader(string $name): PartInterface |
||
102 | |||
103 | /** |
||
104 | * @param StreamInterface $body |
||
105 | * @return PartInterface |
||
106 | */ |
||
107 | public function withBody(StreamInterface $body): PartInterface |
||
111 | |||
112 | /** |
||
113 | * @return StreamInterface |
||
114 | */ |
||
115 | 6 | public function getBody(): StreamInterface |
|
119 | } |
||
120 |
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.