| 1 | <?php |
||
| 20 | final class MultipartBody |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | private $name; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var StreamInterface |
||
| 29 | */ |
||
| 30 | private $contents; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var array |
||
| 34 | */ |
||
| 35 | private $headers; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @var string |
||
| 39 | */ |
||
| 40 | private $filename; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Constructor |
||
| 44 | * |
||
| 45 | * @param string $name |
||
| 46 | * @param mixed $contents |
||
| 47 | * @param array[] $headers |
||
| 48 | * @param null|string $filename |
||
| 49 | */ |
||
| 50 | 5 | public function __construct(string $name, $contents, array $headers = [], ?string $filename = null) |
|
| 57 | |||
| 58 | /** |
||
| 59 | * @return string |
||
| 60 | */ |
||
| 61 | 5 | public function getName(): string |
|
| 65 | |||
| 66 | /** |
||
| 67 | * @return StreamInterface |
||
| 68 | */ |
||
| 69 | 5 | public function getContents(): StreamInterface |
|
| 73 | |||
| 74 | /** |
||
| 75 | * @return array |
||
| 76 | */ |
||
| 77 | 5 | public function getHeaders(): array |
|
| 81 | |||
| 82 | /** |
||
| 83 | * @return string|null |
||
| 84 | */ |
||
| 85 | 5 | public function getFilename(): ?string |
|
| 89 | } |
||
| 90 |