Re: [PEPr] Changes in proposal for Streams::Stream_Iterate

From: Date: Sat, 03 May 2008 00:57:52 +0000
Subject: Re: [PEPr] Changes in proposal for Streams::Stream_Iterate
References: 1 2 3 4 5 6  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-49976@lists.php.net to get a copy of this message
Gregory Beaver wrote: >> Philippe Jausions wrote: >> >> Agreed, I think using some kind of namespace in wrapper names is good, >> and "pear." is a good candidate. How do we manage our own names though? >> Should we use the package name as a basis for it? How about packages >> that provide a stream but are not in the Stream category? Amazon_S3 is a >> good example I think. Would that become pear.servicesamazons3, >> pear.services.amazon.s3 ? ugly :-( >> pear.s3 might be causing issues down the line, who knows if some "S3" >> protocol name would be better suited for something else down the line. >> >> And of course the end user, would rather simply have s3:// >> >> We still need a way for a user to register the wrapper as they wish, and >> possibly in a consistent manner across of PEAR packages. More a >> convenience tool, than required though. > > I'm a big fan of first-come-first-serve for stream wrappers. It's not > likely we're going to see a huge influx, this is a pretty specialized > solution to particular problems. pear.s3 is just fine. One other > advantage of userspace wrappers is that we can also register another > protocol name for the wrapper and it will work just fine (unless the > wrapper explicitly checks for its wrapper name). This means users could > simply register "s3" for the pear version if they wish. > > Greg I think we'd need a wiki page to keep trace of those then. That being said, I'm not a big fan of the package self-registering the stream protocol. Maybe the question will pop again when some package wants to depend on the stream wrapper defined by another package. Right now, I think most of the stream wrappers are only used in userland, so self-registration doesn't have much of a case. I hardly see a user wanting to use pear.xyz as protocol name. Anyway, back to the original question: Should all packages that implements a stream wrapper follow the same registration method. Or should that be left completely up to the user to call stream_wrapper_register() ? There is not much of a strong case for a separate PHP_Stream package, besides convenience for the user, and possible exception throwing with more details then your standard FALSE return code. As long as we're not reinventing the wheel in each package. Thoughts? -Philippe

« previous php.pear.dev (#49976) next »