LimeSurvey API - Master branch

LSFileHelper extends CFileHelper
in package

Table of Contents

Methods

getExtensionByMimeType()  : string|null
getMimeType()  : string|null

Methods

getExtensionByMimeType()

public static getExtensionByMimeType(mixed $file[, mixed $magicFile = null ]) : string|null
Parameters
$file : mixed
$magicFile : mixed = null
Tags
inheritdoc

Can not call parent since usage of self::getMimeType Set $magicFile (php array) from config (if is null)

see
https://www.yiiframework.com/doc/api/1.1/CFileHelper#getExtensionByMimeType-detail
Return values
string|null

extension name. Null is returned if the extension cannot be determined.

getMimeType()

public static getMimeType(mixed $file[, mixed $magicFile = null ][, mixed $checkExtension = true ]) : string|null
Parameters
$file : mixed
$magicFile : mixed = null
$checkExtension : mixed = true
Tags
inheritdoc

Set $magicFile (magic dataBase) from config (if is null) Use the magic file set by user only iof needed (else keep pĥp default or MAGIC env)

see
https://www.php.net/manual/en/function.finfo-open.php
Return values
string|null

string if the MIME type. Null is returned if the MIME type cannot be determined.


        
On this page

Search results