3 declare(strict_types = 1);
17 $dbJson = file_get_contents(dirname(__DIR__) .
'/node_modules/mime-db/db.json');
22 foreach (
$dbJson as $mimeType => $mimeTypeInfo) {
23 if (isset($mimeTypeInfo[
'extensions'])) {
31 $mimeTypeString .=
" '" . $mimeType .
"' => ['" . implode(
"', '", $extensionInfo) .
"'],
36 declare(strict_types = 1);
37 namespace TYPO3\CMS\Core\Resource;
40 * This file is part of the TYPO3 CMS project.
42 * It is free software; you can redistribute it and/or modify it under
43 * the terms of the GNU General Public License, either version 2
44 * of the License, or any later version.
46 * For the full copyright and license information, please read the
47 * LICENSE.txt file that was distributed with this source code.
49 * The TYPO3 project - inspiring people to share!
56 final class MimeTypeCollection
65 public function getMap(): array
73 public function getMimeTypes(): array
75 return array_keys($this->map);
80 file_put_contents(dirname(dirname(__DIR__)) .
'/typo3/sysext/core/Classes/Resource/MimeTypeCollection.php',
$classTemplate);