@@ 17-34 (lines=18) @@ | ||
14 | /** |
|
15 | * Type mapping provider for data serialization filetypes. |
|
16 | */ |
|
17 | class SerializationTypeMap implements TypeMapInterface |
|
18 | { |
|
19 | /** |
|
20 | * {@inheritdoc} |
|
21 | * |
|
22 | * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types |
|
23 | */ |
|
24 | public function getMap() |
|
25 | { |
|
26 | return [ |
|
27 | new Type(['csv'], 'text/csv'), |
|
28 | new Type(['json'], 'application/json'), |
|
29 | new Type(['xml', 'xsd'], 'application/xml'), |
|
30 | new Type(['xsl', 'xslt'], 'application/xslt+xml'), |
|
31 | new Type(['yml', 'yaml'], 'text/yaml'), |
|
32 | ]; |
|
33 | } |
|
34 | } |
|
35 |
@@ 17-32 (lines=16) @@ | ||
14 | /** |
|
15 | * Type mapping provider for (client-side) web application filetypes. |
|
16 | */ |
|
17 | class WebApplicationTypeMap implements TypeMapInterface |
|
18 | { |
|
19 | /** |
|
20 | * {@inheritdoc} |
|
21 | */ |
|
22 | public function getMap() |
|
23 | { |
|
24 | return [ |
|
25 | new Type(['css'], 'text/css'), |
|
26 | new Type(['html', 'htm'], 'text/html'), |
|
27 | new Type(['js'], 'application/javascript'), |
|
28 | new Type(['swf'], 'application/x-shockwave-flash'), |
|
29 | new Type(['xhtml'], 'application/xhtml+xml'), |
|
30 | ]; |
|
31 | } |
|
32 | } |
|
33 |