[PEPr] Comment on HTTP::Sync
| From: | Philippe Jausions | Date: | Wed, 31 May 2006 18:09:14 +0000 |
| Subject: | [PEPr] Comment on HTTP::Sync | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-42718@lists.php.net to get a copy of this message | ||
Philippe Jausions (http://pear.php.net/user/jausions) has commented on the proposal for HTTP::Sync.
Comment:
IMO it is not a good idea to extends HTTP_Request. Instead you should use
an internal instance of HTTP_Request. The reason behind this is that when
HTTP_Request gets support for other backend (i.e. cURL, stream...) you
package wouldn't benefit from the upgrade.
The way you have it, the get() method could fail returning any content,
even if a local outdated file is present. So, I'm not sure if the get()
belongs in there, or maybe it's just misnamed. I would rename
"synchronize()" to "download()"; and "get()" into
"synchronize()", and
leave the file_get_contents() to userland (which is BTW not always
available.)
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=402
--
Sent by PEPr, the automatic proposal system at http://pear.php.net