Re: [PHP-DEV] Getting an external param into a userspace streams filter...

[email protected] (David Brown)
Newsgroups php.dev
Message-ID <[email protected]>
Hi Wez:

On Thu, Feb 27, 2003 at 04:26:40PM +0000, Wez Furlong wrote:
| Hi David,
| 
| user filters are in a little bit of flux atm.
| 
| However, the idea is that the param argument will be altered to be a
| zval (rather than just a string).
| 
| In the oncreate() method, the following member variables are available
| to the filter:
| 
| string $this->filtername; // name of the filter
| mixed $this->params;      // params passed from prepend/append func

Excellent. :) I did finally find where $this->params gets set (in
ext/standard/user_filters.c:242), but I figured a third reply to myself
would probably just be embarassing. ;-)


| Hope this helps; please only use current CVS for PHP 5 for playing
| around with this stuff; if you run into problems let me (and Sara
| <[email protected]>) know and we can sort them out.

Will do. I'm currently wrapping the experimental streams stuff in a
class, falling back to a user-space streams/filter implementation when
the PHP 5 one isn't available.

I'm currently using the oncreate() method (of my wrapper class) to
transmit the parameters to the filter; I just wanted to make sure that
this wouldn't bite me when I tried to slide the PHP filter
implementation underneath it.

Anyway, much thanks.

- Dave
  [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.