src/Entity/Attachment.php
public function getMimeType()
    {
        if (empty($this->mimeType)) {
            $resource = finfo_open(FILEINFO_MIME_TYPE);
            $this->mimeType = finfo_file($resource, $this->getRealPath());
        }

        return $this->mimeType;
    }
public function getMimeType()
    {
        if (empty($this->mimeType)) {
            $resource = finfo_open(FILEINFO_MIME_TYPE);
            $this->mimeType = finfo_file($resource, $this->getRealPath());
        }

        return $this->mimeType;
    }
public function getMimeType ( ) { if ( empty ( $ this -> mimeType ) ) { $ resource = finfo_open ( FILEINFO_MIME_TYPE ) ; $ this -> mimeType = finfo_file ( $ resource , $ this -> getRealPath ( ) ) ; } return $ this -> mimeType ; }
Get Mime Type

@return string
Get Mime Type