|
|
|
@ -56,32 +56,19 @@ class Detection implements IMimeTypeDetector {
|
|
|
|
|
private const CUSTOM_MIMETYPEMAPPING = 'mimetypemapping.json';
|
|
|
|
|
private const CUSTOM_MIMETYPEALIASES = 'mimetypealiases.json';
|
|
|
|
|
|
|
|
|
|
protected $mimetypes = [];
|
|
|
|
|
protected $secureMimeTypes = [];
|
|
|
|
|
|
|
|
|
|
protected $mimetypeIcons = [];
|
|
|
|
|
/** @var string[] */
|
|
|
|
|
protected $mimeTypeAlias = [];
|
|
|
|
|
|
|
|
|
|
/** @var IURLGenerator */
|
|
|
|
|
private $urlGenerator;
|
|
|
|
|
|
|
|
|
|
private LoggerInterface $logger;
|
|
|
|
|
|
|
|
|
|
/** @var string */
|
|
|
|
|
private $customConfigDir;
|
|
|
|
|
|
|
|
|
|
/** @var string */
|
|
|
|
|
private $defaultConfigDir;
|
|
|
|
|
|
|
|
|
|
public function __construct(IURLGenerator $urlGenerator,
|
|
|
|
|
LoggerInterface $logger,
|
|
|
|
|
string $customConfigDir,
|
|
|
|
|
string $defaultConfigDir) {
|
|
|
|
|
$this->urlGenerator = $urlGenerator;
|
|
|
|
|
$this->logger = $logger;
|
|
|
|
|
$this->customConfigDir = $customConfigDir;
|
|
|
|
|
$this->defaultConfigDir = $defaultConfigDir;
|
|
|
|
|
protected array $mimetypes = [];
|
|
|
|
|
protected array $secureMimeTypes = [];
|
|
|
|
|
|
|
|
|
|
protected array $mimetypeIcons = [];
|
|
|
|
|
/** @var array<string,string> */
|
|
|
|
|
protected array $mimeTypeAlias = [];
|
|
|
|
|
|
|
|
|
|
public function __construct(
|
|
|
|
|
private IURLGenerator $urlGenerator,
|
|
|
|
|
private LoggerInterface $logger,
|
|
|
|
|
private string $customConfigDir,
|
|
|
|
|
private string $defaultConfigDir,
|
|
|
|
|
) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -151,7 +138,7 @@ class Detection implements IMimeTypeDetector {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string[]
|
|
|
|
|
* @return array<string,string>
|
|
|
|
|
*/
|
|
|
|
|
public function getAllAliases(): array {
|
|
|
|
|
$this->loadAliases();
|
|
|
|
|