addMimeType

@param stirng $mimeType

@return MimeType
163875
public function addMimeType($mimeType)
    {
        if (!in_array($mimeType, $this->mimeTypes)) {
            $this->mimeTypes[] = $mimeType;
        }

        return $this;
    }
311303
protected function _getMimeIcon( $mimetype )
	{
		$config = $this->_getContext()->getConfig();

		/** controller/extjs/media/default/mimeicon/directory
		 * Directory that contains the icons for the different mime types
		 *
		 * If no preview image can be generated from an uploaded file, an icon
		 * for its mime type is displayed instead. The directory for the mime
		 * icons is structured by the general mime type (e.g. "image") as
		 * sub-directory and the specific name of the mime type (e.g. "jpeg")
		 * as file name.
		 *
		 * The mime icon directory must be relative to the "basedir" configuration
		 * option. If
		 *
		 *  /var/www/test
		 *
		 * is the configured base directory and the upload directory should be
		 * located in
		 *
		 *  /var/www/test/media/mime
		 *
		 * then the configuration for the uploads directory must be
		 *
		 *  media/mime
		 *
		 * Avoid leading and trailing slashes for the upload directory string!
		 *
		 * @param string Path relative to the base directory
		 * @since 2014.03
		 * @category Developer
		 * @see controller/extjs/media/default/basedir
		 */
		if( ( $mimedir = $config->get( 'controller/extjs/media/default/mimeicon/directory', null ) ) === null )
		{
			$this->_getContext()->getLogger()->log( 'No directory for mime type images configured' );
			return '';
		}

		/** controller/extjs/media/default/mimeicon/extension
		 * File extension of the mime icon images
		 *
		 * If you would like to use different mime icons that are available in
		 * another file format, you have to change the file extension for the
		 * mime icons to the actual ones.
		 *
		 * Note: The configured file extension needs a leading dot!
		 *
		 * @param string File extension including a leading dot, e.g ".jpg"
		 * @since 2014.03
		 * @category Developer
		 */
		$ext = $config->get( 'controller/extjs/media/default/mimeicon/extension', '.png' );
		$abspath = $this->_getAbsoluteDirectory( $mimedir ) . DIRECTORY_SEPARATOR . $mimetype . $ext;
		$mimeicon = $mimedir . DIRECTORY_SEPARATOR . $mimetype . $ext;

		if( is_file( $abspath ) === false ) {
			$mimeicon = $mimedir . DIRECTORY_SEPARATOR . 'unknown' . $ext;
		}

		return $mimeicon;
	}
613116
public function mimetype()
    {
        if (!$this->mimetype) {
            $val = $this->val();

            if (!$val) {
                return '';
            }

            $this->setMimetype($this->mimetypeFor(strval($val)));
        }

        return $this->mimetype;
    }
26831
public function setMIMEType(string $mimetype)
    {
        if ($this->discoverInterface()) {
            $this->nb_interface->setMIMEType($mimetype);
        } else {
            throw new ENabuRenderException(
                ENabuRenderException::ERROR_RENDER_NOT_FOUND,
                array($this->nb_descriptor->getKey())
            );
        }

        return $this;
    }
501722
public function addMimeTypeToExtension($mime_type, $extension)
    {
        if (is_array($extension)) {
            $this->mime_type_to_extensions[$mime_type] = $extension;
        } else {
            $this->mime_type_to_extensions[$mime_type] = array($extension);
        }

        return true;
    }
576743
public function getByMimetype($mimetype)
    {
        if (isset($this->mimetypeMap[$mimetype])) {
            return $this->get($this->mimetypeMap[$mimetype]);
        }

        return null;
    }
742679
public static function getByMimeType(?string $mimeType): int
    {
        switch (explode('/', (string) $mimeType)[0] ?? null) {
            case 'image':
                return static::IMAGE;
            case 'audio':
                return static::AUDIO;
            case 'video':
                return static::VIDEO;
            default:
                return static::FILE;
        }
    }
1209709
public static function is_convertable($mimetype = null)
    {
        $rcube = rcube::get_instance();

        // @TODO: check if specified mimetype is really supported
        return class_exists('Imagick', false) || $rcube->config->get('im_convert_path');
    }
1044615
public function MapMimeTypeToExtension($extension, $mime_type)
    {
        if (!isset($this->extension_to_mime_types[$extension])) {
            $this->extension_to_mime_types[$extension] = array($mime_type);
        } else {
            $this->extension_to_mime_types[$extension][] = $mime_stype;
        }

        return true;
    }
1343212
private function checkMimeTypeSupported($mimeType)
    {
        foreach ($this->supportedMimeTypes as $supportedMimeType) {
            if (fnmatch($supportedMimeType, $mimeType)) {
                return true;
            }
        }

        return false;
    }
12422
public function mimeToExtension($mimeType)
    {
        $mimeType = strtolower($mimeType);
        $mime = array_search($mimeType, self::$mime_types_and_extensions);

        return $mime;
    }
272156
public function addFormat($format, array $mimeTypes, array $extensions = null)
    {
        $this->formats[$format] = [is_null($extensions) ? [$format] : $extensions, $mimeTypes];

        return $this;
    }
147624
function mimeTypeOverride( $mimeData )
    {
        if ( $this->hasMIMETypeSetting( $mimeData ) )
        {
            $settings = $this->mimeTypeSetting( $mimeData );
            if ( $settings )
            {
                return $settings['override_mime_type'];
            }
        }
        return false;
    }
816542
public function setMimeType(string $mime_type) {
        if(!$this->setModified('mime_type', $mime_type)->isModified()) {
            return $this;
        }
		$this->mime_type = $mime_type;
		return $this;
    }
356164
public function isAcceptMimetype($mimetype)
    {
        if ($this->hasHeader('Accept')) {
            return $this->isAccept($this->getHeader('Accept'), $mimetype);
        }
        return false;
    }
1222391
public void setMimeType(com.google.api.ads.admanager.axis.v201805.MimeType mimeType) {
        this.mimeType = mimeType;
    }
1335689
public static function getMimeType($tmpName) {

    $finfo = finfo_open(FILEINFO_MIME_TYPE);
    $mimeType = finfo_file($finfo, $tmpName);

    return $mimeType;
  }