public function getMimeType()
    {
        if (!$this->mimeType) {
            $finfo = finfo_open(FILEINFO_MIME_TYPE, $this->magicFile);
            if (!$finfo) {
                throw new \UnexpectedValueException('Failed to open fileinfo database');
            }
            $this->mimeType = finfo_file($finfo, $this->file);
        }
        return $this->mimeType;
    }
public function getMimeType()
    {
        if (!$this->mimeType) {
            $finfo = finfo_open(FILEINFO_MIME_TYPE, $this->magicFile);
            if (!$finfo) {
                throw new \UnexpectedValueException('Failed to open fileinfo database');
            }
            $this->mimeType = finfo_file($finfo, $this->file);
        }
        return $this->mimeType;
    }
public function getMimeType ( ) { if ( ! $ this -> mimeType ) { $ finfo = finfo_open ( FILEINFO_MIME_TYPE , $ this -> magicFile ) ; if ( ! $ finfo ) { throw new \ UnexpectedValueException ( 'Failed to open fileinfo database' ) ; } $ this -> mimeType = finfo_file ( $ finfo , $ this -> file ) ; } return $ this -> mimeType ; }
Returns the file mime type on success

@return string|false
@throws \UnexpectedValueException When failed to open fileinfo database
Returns the file mime type on success