3 declare(strict_types=1);
93 if ($declaredMimeType != $detectedMimeType) {
100 'QPL: imported image with declared mime (' . $declaredMimeType .
') ' 101 .
'and detected mime (' . $detectedMimeType .
')' 128 $label = basename($label);
137 $finfo =
new finfo(FILEINFO_MIME);
139 return $finfo->buffer($content);
144 $pathInfo = pathinfo($label);
146 if (isset($pathInfo[
'extension'])) {
147 return $pathInfo[
'extension'];
155 $pathInfo = pathinfo($label);
157 return array_key_exists(
'extension', $pathInfo);
static fetchMimeTypeIdentifier(string $contentType)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
hasFileExtension(string $label)
static isAllowedImageFileExtension(string $mimeType, string $fileExtension)
setImageMaterial(ilQTIMatimage $imageMaterial)
static getASCIIFilename(string $a_filename)
static isAllowedImageMimeType($mimeType)
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
determineFileExtension(string $label)
setDetectedMimeType(string $detectedMimeType)
ilQTIMatimage $imageMaterial
__construct(ilQTIMatimage $imageMaterial)
determineMimeType(?string $content)