#42929 [Opn]: Cannot access the old stream wrapper from a wrapper class
| From: | woodsmailbox at yahoo dot com | Date: | Fri, 12 Oct 2007 14:48:28 +0000 |
| Subject: | #42929 [Opn]: Cannot access the old stream wrapper from a wrapper class | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-118476@lists.php.net to get a copy of this message | ||
ID: 42929
User updated by: woodsmailbox at yahoo dot com
Reported By: woodsmailbox at yahoo dot com
Status: Open
Bug Type: Streams related
Operating System: WinXP SP2
PHP Version: 5.2.4
New Comment:
I also think getcwd() and chdir() should be open for stream-wrapping
for the relative paths to work with a wrapper for the default "file"
scheme.
Previous Comments:
------------------------------------------------------------------------
[2007-10-11 14:52:42] woodsmailbox at yahoo dot com
... Another feature that could get me out of this chicken and egg
problem would be to be able to alias a built-in wrapper protocol in its
current configuration (i.e. with it's current handler class). I would
happily alias "file:" to "filesystem:" and then register my own wrapper
class to the "file:" protocol and use the "filesystem:" protocol
internally.
------------------------------------------------------------------------
[2007-10-11 14:24:48] woodsmailbox at yahoo dot com
Description:
------------
I would like to "wrap" a stream wrapper, and this would include calling
the original wrapper's methods from my wrapper class. For instance, I
would like to implement versioning over the file:// protocol but I
cannot access the filesystem while my file:// wrapper is registered. It
would be nice to be able to use the classes of built-in wrappers.
Also, I can't find the php function to change the default wrapper so I
can have relative paths handled by my wrapper. A lot of app. code not
under my control use relative paths. I could register my own file://
wrapper but then again...
My current workaround is to call stream_wrapper_restore() inside my
wrapper's functions, do my thing with the filesystem, then call
stream_wrapper_register() again, but I think this sucks. I hope php is
doing no more than changing some pointers internally when I call these
functions, otherwise, the performance of my wrapper is gone.
Thanx.
Cosmin.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42929&edit=1