Nextcloud PHP API (master)

IMimeTypeLoader

Interface IMimeTypeLoader

Tags
since
8.2.0

Interface to load mimetypes

Table of Contents

Methods

exists()  : bool
Test if a mimetype exists in the database
getId()  : int
Get a mimetype ID, adding the mimetype to the DB if it does not exist
getMimetypeById()  : string|null
Get a mimetype from its ID
reset()  : void
Clear all loaded mimetypes, allow for re-loading

Methods

exists()

Test if a mimetype exists in the database

public exists(string $mimetype) : bool
Parameters
$mimetype : string
Tags
since
8.2.0
Return values
bool

getId()

Get a mimetype ID, adding the mimetype to the DB if it does not exist

public getId(string $mimetype) : int
Parameters
$mimetype : string
Tags
since
8.2.0
Return values
int

getMimetypeById()

Get a mimetype from its ID

public getMimetypeById(int $id) : string|null
Parameters
$id : int
Tags
since
8.2.0
Return values
string|null

reset()

Clear all loaded mimetypes, allow for re-loading

public reset() : void
Tags
since
8.2.0

        
On this page

Search results