[PEPr] Comment on File Formats::File_DNS
| From: | PEPr | Date: | Tue, 15 Jun 2004 11:56:15 +0000 |
| Subject: | [PEPr] Comment on File Formats::File_DNS | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-30673@lists.php.net to get a copy of this message | ||
Michael Wallner (http://pear.php.net/user/mike) has commented on the proposal for File
Formats::File_DNS.
Comment:
Looks great.
Just a side note because I recently stumbled across the same in HTTP - the switch statement in
parseToSeconds() could be simplified to something similar to the following:
[code]
$times = 1;
switch (strtoupper($what))
{
case 'W':
$times *= 7; //Week
case 'D':
$times *= 24; //Day
case 'H':
$times *= 60; //Hour
case 'M':
$times *= 60; //Minute
case 'S':
$times *= $num; //Seconds
break;
default:
return PEAR::raiseError("Unable to parse time. $time",
FILE_DNS_PARSE_TIME_FAILED,
NULL, NULL, $time);
break;
}
return $times;
[/code]
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=53
--
Sent by PEPr, the automatic proposal system at http://pear.php.net