RE: [PHP-DEV] RE: [PATCH] adding stream wrappers to include_path
| From: | Dmitry Stogov | Date: | Thu, 13 Mar 2008 11:25:05 +0000 |
| Subject: | RE: [PHP-DEV] RE: [PATCH] adding stream wrappers to include_path | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-36119@lists.php.net to get a copy of this message | ||
It is too difficult for extension that is not in the core distribution
yet.
For now I think it is simple to override zend_stream_open_function() and
zend_resolve_path_function() callbacks by ext/phar and provide something
like phar.include_path directive.
Thanks. Dmitry.
> -----Original Message-----
> From: Pierre Joye [mailto:pierre.php@gmail.com]
> Sent: Thursday, March 13, 2008 2:12 PM
> To: Dmitry Stogov
> Cc: Gregory Beaver; internals Mailing List
> Subject: Re: [PHP-DEV] RE: [PATCH] adding stream wrappers to
> include_path
>
>
> On Thu, Mar 13, 2008 at 11:55 AM, Dmitry Stogov
> <dmitry@zend.com> wrote:
> > Hi Greg,
> >
> > In general include_path cannot contain pathes with ':' character,
> > because it is the POSIX path separator. So I don't see a
> way to use
> > stream wrappers in include_path. :(
>
> What's about quotes or escape? Quotes are somehow more
> readable and are already used in many places (generally not
> specifically in PHP). I can imagine a:
>
> set_include_path('"foo://something/bar"' . PATH_SEPARATOR .
> get_incude_path());
>
> It may add some complexity in the parser but it can be really
> useful (well, for phar-like applications at least as I would
> not recommend too use that in normal apps :).
>
> Cheers,
> --
> Pierre
> http://blog.thepimp.net |
> http://www.libgd.org
>