1 | <?php |
||
8 | class Attachment |
||
9 | { |
||
10 | /** @var string */ |
||
11 | private $url; |
||
12 | |||
13 | /** @var string */ |
||
14 | private $mimeType; |
||
15 | |||
16 | /** @var string */ |
||
17 | private $title; |
||
18 | |||
19 | /** @var int|float */ |
||
20 | private $size; |
||
21 | |||
22 | /** @var int|float */ |
||
23 | private $duration; |
||
24 | |||
25 | /** |
||
26 | * Constructor |
||
27 | * |
||
28 | * @param string $url |
||
29 | * @param string $mimeType |
||
30 | */ |
||
31 | public function __construct($url, $mimeType) |
||
36 | |||
37 | /** |
||
38 | * Get the location of the attachment |
||
39 | * |
||
40 | * @return string |
||
41 | */ |
||
42 | public function getUrl() |
||
46 | |||
47 | /** |
||
48 | * Get the type of the attachment |
||
49 | * |
||
50 | * @return string |
||
51 | */ |
||
52 | public function getMimeType() |
||
56 | |||
57 | /** |
||
58 | * Get the name for the attachment |
||
59 | * |
||
60 | * @return string |
||
61 | */ |
||
62 | public function getTitle() |
||
66 | |||
67 | /** |
||
68 | * Set the name of the attachment |
||
69 | * |
||
70 | * @param string $title |
||
71 | * @return Attachment |
||
72 | */ |
||
73 | public function setTitle($title) |
||
79 | |||
80 | /** |
||
81 | * Get the size of content |
||
82 | * |
||
83 | * @return float|int |
||
84 | */ |
||
85 | public function getSize() |
||
89 | |||
90 | /** |
||
91 | * Set the size of content |
||
92 | * |
||
93 | * @param float|int $size |
||
94 | * @return Attachment |
||
95 | */ |
||
96 | public function setSize($size) |
||
102 | |||
103 | /** |
||
104 | * Get the duration of the attachment |
||
105 | * |
||
106 | * @return float|int |
||
107 | */ |
||
108 | public function getDuration() |
||
112 | |||
113 | /** |
||
114 | * Specifies how long the attachment takes to listen to or watch |
||
115 | * |
||
116 | * @param float|int $duration |
||
117 | * @return Attachment |
||
118 | */ |
||
119 | public function setDuration($duration) |
||
125 | } |
||
126 |