1 | <?php |
||
10 | class CustomMimetypeHelper extends ApacheMimetypeHelper |
||
11 | { |
||
12 | /** |
||
13 | * @var array |
||
14 | */ |
||
15 | private $mimetypes = []; |
||
16 | |||
17 | /** |
||
18 | * @param array $mimetypes should be of type extension => mimetype |
||
19 | */ |
||
20 | public function __construct(array $mimetypes = []) |
||
24 | |||
25 | /** |
||
26 | * @param string $extension |
||
27 | * @param string $mimetype |
||
28 | * |
||
29 | * @return $this |
||
30 | */ |
||
31 | public function addMimetype($extension, $mimetype) |
||
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | * |
||
41 | * Check if we have any defined mimetypes and of not fallback to ApacheMimetypeHelper |
||
42 | */ |
||
43 | public function getMimetypeFromExtension($extension) |
||
51 | } |
||
52 |