PHP Class CRUDlex\MimeTypes

Afficher le fichier Open project: philiplb/crudlex Class Usage Examples

Protected Properties

Свойство Type Description
$mimeTypes THX to http://stackoverflow.com/questions/134833/how-do-i-find-the-mime-type-of-a-file-with-php

Méthodes publiques

Méthode Description
getMimeType ( string $file ) : string Function to get the mimetype of a file.
getMimeTypeByExtension ( string $file ) : string Gets the mime type by just looking at the extension.
getMimeTypeByFileInfo ( string $file ) : mixed | string Gets the mime type by looking at the file info.

Method Details

getMimeType() public méthode

Function to get the mimetype of a file.
public getMimeType ( string $file ) : string
$file string the file to get the mimetype from
Résultat string the mimetype

getMimeTypeByExtension() public méthode

Gets the mime type by just looking at the extension.
public getMimeTypeByExtension ( string $file ) : string
$file string the file to get the mimetype from
Résultat string the mimetype

getMimeTypeByFileInfo() public méthode

Gets the mime type by looking at the file info.
public getMimeTypeByFileInfo ( string $file ) : mixed | string
$file string the file to get the mimetype from
Résultat mixed | string the mimetype

Property Details

$mimeTypes protected_oe property

THX to http://stackoverflow.com/questions/134833/how-do-i-find-the-mime-type-of-a-file-with-php
protected $mimeTypes