public function detectFromFilename($filename) { $metadata = new Metadata(); $metadata->set(Metadata::RESOURCE_NAME_KEY, $filename); return $this->normalizeInternetMediaType($this->detector->detect($this->internetMediaTypeParser, null, $metadata)); }