mikehaertl\wkhtmlto\Image::getMimeType PHP Méthode

getMimeType() public méthode

public getMimeType ( ) : string
Résultat string the mime type for the current image
    public function getMimeType()
    {
        if ($this->type === 'jpg') {
            return 'image/jpeg';
        } elseif ($this->type === 'png') {
            return 'image/png';
        } elseif ($this->type === 'bmp') {
            return 'image/bmp';
        } else {
            throw new \Exception('Invalid image type');
        }
    }