1 | <?php |
||
17 | class Type |
||
18 | { |
||
19 | /** |
||
20 | * @var string[] |
||
21 | */ |
||
22 | private $extensions; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | private $mimeType; |
||
28 | |||
29 | /** |
||
30 | * Constructor. |
||
31 | * |
||
32 | * @param string[] $extensions |
||
33 | * @param string $mimeType |
||
34 | */ |
||
35 | 10 | public function __construct(array $extensions, $mimeType) |
|
40 | |||
41 | /** |
||
42 | * Returns the file extensions for the file type. |
||
43 | * |
||
44 | * @return string[] |
||
45 | */ |
||
46 | 7 | public function getExtensions() |
|
50 | |||
51 | /** |
||
52 | * Returns the preferred file extension for the file type. |
||
53 | * |
||
54 | * @return string |
||
55 | */ |
||
56 | 1 | public function getPreferredExtension() |
|
60 | |||
61 | /** |
||
62 | * Returns the MIME type for the file type. |
||
63 | * |
||
64 | * @return string |
||
65 | */ |
||
66 | 7 | public function getMimeType() |
|
70 | } |
||
71 |