• PHP reference
  • Services
  • Files

MimeHelper

class Services\Files\MimeHelper

Class MimeHelper

Properties

static $mimes

Methods

static string getMimeType(string $filename)

Get mime type for a filename. This filename might be an actual path in the local filesystem, or simply a non-existing theoretical filename. In the last case, only the extension of the file is considered when determining the file's mime type.

Parameters

  • string $filename

Return Value

  • string $mime