1: <?php declare(strict_types=1);
2:
3: namespace Salient\Contract\Http;
4:
5: use Psr\Http\Message\StreamInterface;
6: use Salient\Contract\Core\Immutable;
7:
8: /**
9: * @api
10: */
11: interface HttpMultipartStreamPartInterface extends Immutable
12: {
13: /**
14: * Get an instance with the given field name
15: */
16: public function withName(string $name): HttpMultipartStreamPartInterface;
17:
18: /**
19: * Get the field name of the part
20: */
21: public function getName(): string;
22:
23: /**
24: * Get the filename of the part
25: */
26: public function getFilename(): ?string;
27:
28: /**
29: * Get the ASCII fallback filename of the part
30: */
31: public function getFallbackFilename(): ?string;
32:
33: /**
34: * Get the media type of the part
35: */
36: public function getMediaType(): ?string;
37:
38: /**
39: * Get the content of the part
40: */
41: public function getContent(): StreamInterface;
42: }
43: