Re: Fwd: [PHP-CVS] cvs: php4 /main fopen-wrappers.cfopen-wrappers.h
| From: | Hartmut Holzgraefe | Date: | Wed, 16 Aug 2000 20:07:41 +0000 |
| Subject: | Re: Fwd: [PHP-CVS] cvs: php4 /main fopen-wrappers.cfopen-wrappers.h | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-29182@lists.php.net to get a copy of this message | ||
Andi Gutmans wrote:
> As I mention in my commit message I want to start cleaning up this mess.
> > - How about moving URL stuff out of this file?
regarding mess and URL stuff:
i already gave it a try once but didn't continue after the first
step was done and registration of additional url types was possible
the next thing i'd like to do is to move the http: and ftp:
wrappers out to ext/standard and register them from there
this would only be a cosmetic change in the first place and the code
would still be ugly, only that it would be distributed over several
files
but it would devide the url wrapper mechanism from it's implementations
and i strongly belive that while the interface should stay in main
the implementations for different url types belong into the ext tree
...
as a final step (in a distant future?) i'd like to see even further
wrapping that does not only wrap fopen, but also fread, fwrite and
fclose
right now wrapping anything that does not return a FILE* or a
socket is, well, not easy
not every system has a current glibc that provides FILE* generalization
via the fopencookie(...) mechanism, tricks using pipe()s and
socketpairs()
only work up to a certain size limit and temporary files are performance
killers
what i dream of is a chance to have statements like
include "mysql:..."; or fopen "zip:archive.zip:some/file/in/archive";
without doing the dirty tricks described above
(hope this wasn't to confusing)
--
Hartmut Holzgraefe
hartmut@six.de http://www.six.de +49-711-99091-77 fax:-99