# CRUDlex\MimeTypes

class `MimeTypes`

  Class to get a mimetype from a file.

  property `mimeTypes`

    protected

    Map from file extension to mimetype. THX to http://stackoverflow.com/questions/134833/how-do-i-find-the-mime-type-of-a-file-with-php

  `getMimeTypeByExtension`($file)

    Gets the mime type by just looking at the extension.

    Parameters: | $file (string) – the file to get the mimetype from
    Returns: | string the mimetype

  `getMimeTypeByFileInfo`($file)

    Gets the mime type by looking at the file info.

    Parameters: | $file (string) – the file to get the mimetype from
    Returns: | mixed|string the mimetype

  `getMimeType`($file)

    Function to get the mimetype of a file.

    Parameters: | $file (string) – the file to get the mimetype from
    Returns: | string the mimetype