Arikaim CMS

FileTypeTrait

File type trait

Table of Contents

Methods

getFileType()  : string|false
Get file type
getMimeTypeColumnName()  : string
Get default column name
getMimeTypeColumnValue()  : string|null
Get file mime type value
isApplication()  : bool
Return true if file is application
isAudio()  : bool
Return true if file is audio
isDirectory()  : bool
Return true if file type is directory
isFileType()  : bool
Return true if file have mime type
isFont()  : bool
Return true if file is font
isImage()  : bool
Return true if file is image
isPdf()  : bool
Return true if file is pdf
isText()  : bool
Return true if file is text
isVideo()  : bool
Return true if file is video
isZip()  : bool
Return true if file type is zip
scopeFileTypeQuery()  : Builder
File type scope

Methods

getFileType()

Get file type

public getFileType() : string|false
Return values
string|false

getMimeTypeColumnName()

Get default column name

public getMimeTypeColumnName() : string
Return values
string

getMimeTypeColumnValue()

Get file mime type value

public getMimeTypeColumnValue() : string|null
Return values
string|null

isApplication()

Return true if file is application

public isApplication() : bool
Return values
bool

isAudio()

Return true if file is audio

public isAudio() : bool
Return values
bool

isDirectory()

Return true if file type is directory

public isDirectory() : bool
Return values
bool

isFileType()

Return true if file have mime type

public isFileType(string $type) : bool
Parameters
$type : string

one from: image,video,audio,application,text,pdd,font

Return values
bool

isFont()

Return true if file is font

public isFont() : bool
Return values
bool

isImage()

Return true if file is image

public isImage() : bool
Return values
bool

isPdf()

Return true if file is pdf

public isPdf() : bool
Return values
bool

isText()

Return true if file is text

public isText() : bool
Return values
bool

isVideo()

Return true if file is video

public isVideo() : bool
Return values
bool

isZip()

Return true if file type is zip

public isZip() : bool
Return values
bool

scopeFileTypeQuery()

File type scope

public scopeFileTypeQuery(Builder $query, string $type) : Builder
Parameters
$query : Builder
$type : string
Return values
Builder

        
On this page

Search results