src/AssetManager/Service/MimeResolver.php
public function getMimeType($filename)
    {
        $extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION));

        if (isset($this->mimeTypes[$extension])) {
            return $this->mimeTypes[$extension];
        }

        return 'text/plain';
    }
public function getMimeType($filename)
    {
        $extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION));

        if (isset($this->mimeTypes[$extension])) {
            return $this->mimeTypes[$extension];
        }

        return 'text/plain';
    }
public function getMimeType ( $ filename ) { $ extension = strtolower ( pathinfo ( $ filename , PATHINFO_EXTENSION ) ) ; if ( isset ( $ this -> mimeTypes [ $ extension ] ) ) { return $ this -> mimeTypes [ $ extension ] ; } return 'text/plain' ; }
Get the mime type from a file extension.

@param  string $filename
@return string The mime type found. Falls back to text/plain.
Get the mime type from a file extension .