Sure MIME is mostly used in mail, because that's the most used messaging system. But it's not limited to mail and could be used in other protocols. Also Zend_Mail_Message and Zend_Mail_Part should be based on it, but that's an other story.

On the other hand the mime-type or content-type is not limited to MIME and guessing the content-type by searching for magic sequences is not really about MIME. But I could imagine something like that could be implemented as Zend_Mime_Magic - that wouldn't change anything in Zend_Mime, as it isn't necessary, IMHO.

nico

[26.02.2007 23:07] Matthew Ratzloff wrote:

Based on the code, Zend_Mime is strictly limited to mail-related
functionality. A quick grep also shows that it is only used in Zend_Mail
and Zend_Mail_Part.  Why is this a top-level component?

When I think of Zend_Mime, I think of Mime Magic functionality: parsing a
magic file to determine the content type of a file, like
'application/x-tar'.

This actually threw me off today, because I looked into Zend_Mime
expecting functionality like this.  PHP's mime_content_type() is
deprecated in favor of Fileinfo, but Fileinfo is a PECL extension--a
rather irritating one to install on Linux, incidentally.  Portability
would be easier with a native PHP magic.mime parser, but that can't happen
while Zend_Mime occupies its current place.

Thoughts?

-Matt


Reply via email to