[PEPr] Comment on Tools and Utilities::MIME_ContentType
| From: | PEPr | Date: | Tue, 20 Apr 2004 00:42:33 +0000 |
| Subject: | [PEPr] Comment on Tools and Utilities::MIME_ContentType | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-28095@lists.php.net to get a copy of this message | ||
Alan Knowles (http://pear.php.net/user/alan_k) has commented on the proposal for Tools and
Utilities::MIME_ContentType.
Comment:
looks mostly ok - few comments:
- its probably not a good idean to include/require files at the top of the applicaiton unless you
absolutely need them, everywhere.
for this:
PEAR_CONFIG_DEFAULT_DATA_DIR.
DIRECTORY_SEPARATOR.'MIME_ContentType'.DIRECTORY_SEPARATOR.'mime.types';'
you probably dont need DIRECTORY_SEPARATOR - AFAIK most of php's file functions remap them ok
singleton - it's slightly faster to use $GLOBALS[], rather than a static
I'm not sure if depending on System_Command for which and exec, is that effecient..
File_MimeTypes seems a better name, as it reads/writes mimetypes, + executes the file command..
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=54
--
Sent by PEPr, the automatic proposal system at http://pear.php.net