code: public function setMimetype($mimetype)
      {
          if ($mimetype instanceof MimeType) {
              $this->mimetype = $mimetype;
          } elseif (is_array($mimetype)) {
              $this->mimetype = new MimeType($mimetype);
          } else {
              $this->mimetype = null;
              trigger_error('Argument must be an object of class MimeType. Data loss!', E_USER_WARNING);
          }
  
          return $this;
      }
docs: Sets the "mimetype" of the MediaResponse.
  
  @param MimeType $mimetype
  
  @return MediaResponse