1 | <?php |
||
19 | final class Attachment |
||
20 | { |
||
21 | private $usageType; |
||
22 | private $contentType; |
||
23 | private $length; |
||
24 | private $sha2; |
||
25 | private $display; |
||
26 | private $description; |
||
27 | private $fileUrl; |
||
28 | |||
29 | /** |
||
30 | * @param string $usageType The type of usage of this attachment |
||
31 | * @param string $contentType The content type of the attachment |
||
32 | * @param int $length The length of the attachment data in octets |
||
33 | * @param string $sha2 The SHA-2 hash of the attachment data |
||
34 | * @param LanguageMap $display Localized display name (title) |
||
35 | * @param LanguageMap|null $description Localized description |
||
36 | * @param string|null $fileUrl An IRL at which the attachment data can be retrieved |
||
37 | */ |
||
38 | public function __construct($usageType, $contentType, $length, $sha2, LanguageMap $display, LanguageMap $description = null, $fileUrl = null) |
||
48 | |||
49 | public function getUsageType() |
||
53 | |||
54 | public function getContentType() |
||
58 | |||
59 | public function getLength() |
||
63 | |||
64 | public function getSha2() |
||
68 | |||
69 | public function getDisplay() |
||
73 | |||
74 | public function getDescription() |
||
78 | |||
79 | public function getFileUrl() |
||
83 | |||
84 | public function equals(Attachment $attachment) |
||
120 | } |
||
121 |