Re: package proposal: MIME_ContentType
| From: | Tomas V.V.Cox | Date: | Sat, 14 Jun 2003 15:52:40 +0000 |
| Subject: | Re: package proposal: MIME_ContentType | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-17455@lists.php.net to get a copy of this message | ||
----- Original Message -----
From: "Martin Jansen" <mj@php.net>
To: "Ian Eure" <ieure@debian.org>
Cc: <pear-dev@lists.php.net>
Sent: Saturday, June 14, 2003 3:35 PM
Subject: Re: [PEAR-DEV] package proposal: MIME_ContentType
> On Wed Jun 11, 2003 at 12:4833PM -0700, Ian Eure wrote:
> > MIME_ContentType is a PEAR package for looking up a file's mimetype.
> >
> > Features:
> > * Uses the system's mime database (/etc/mime.types) by default
> > * Can find the mime-type for a file extension. (forward lookup)
> > * Can find valid extensions for a mime-type (backward lookup)
> > * MIME types may be added and removed.
> > * New mime.types file may be written containing all the types
MIME_ContentType
> > knows about.
> >
> > It's under the PHP license, and the code is available for review at
> > http://people.debian.org/~ieure/ContentType.phps
>
> I'm +1 on this. But why is the class derived from PEAR? I don't see a
> need for this ...
I'm not very sure with this class, as from PHP 4.3.0 there is already native
mime_magic support in PHP
(http://es2.php.net/manual/en/function.mime-content-type.php). Others
proposed some nice implementations time ago:
1) http://marc.theaimsgroup.com/?l=pear-dev&m=105464075007193&w=2
2) http://cvs.horde.org/co.php/horde/lib/MIME/Magic.php
The most completed of the three or a mix of all should be the one to commit
imo.
Tomas V.V.Cox
CCed to the authors of the other classes