PHP Класс CRUDlex\MimeTypes

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$mimeTypes THX to http://stackoverflow.com/questions/134833/how-do-i-find-the-mime-type-of-a-file-with-php

Открытые методы

Метод Описание
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.

Описание методов

getMimeType() публичный Метод

Function to get the mimetype of a file.
public getMimeType ( string $file ) : string
$file string the file to get the mimetype from
Результат string the mimetype

getMimeTypeByExtension() публичный Метод

Gets the mime type by just looking at the extension.
public getMimeTypeByExtension ( string $file ) : string
$file string the file to get the mimetype from
Результат string the mimetype

getMimeTypeByFileInfo() публичный Метод

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
Результат mixed | string the mimetype

Описание свойств

$mimeTypes защищенное свойство

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