Re: Overloaded class registration

From: Date: Tue, 09 Nov 2004 22:06:02 +0000
Subject: Re: Overloaded class registration
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-1599@lists.php.net to get a copy of this message
evan, i've only browsed casually, but it seems that you are using a sub-optimal way of implementing properties in an overloaded object. __get and __set are more geared for userland code, whereas the read_property and write_property callbacks of the zend_object_handlers struct is intended for internal objects. for an example of how this works, check out some old code i wrote at http://cvs.voltex.jp/php-i18n/currency_class.c?rev=1.2&content-type=text/x-cvsweb-markup look for the portion starting with "Object Handler Stuff". it should give you a general idea of what needs to be done. l0t3k "Evan Nemerson" <evan@coeus-group.com> wrote in message news:200411091239.35473.evan@coeus-group.com... > Hi all, > > I noticed yesterday that both of my extensions (fann and panda) are emitting > error messages in >= 5.0.2 when their methods are registered--specifically, > the __get() and __set() methods. In zend_check_magic_method_implementation(), > it seems that num_args is always 0, even though they are properly set (or so > I thought) prior to registering them. > > I've tried going through the function registration code a bit, but I'm not > very familiar with ZE2 internals, so I thought I'd see if someone else had an > idea? > > The pertinant portion of the code is based on the SOAP extension. The source > code for the fann extension is at > http://cvs.sourceforge.net/viewcvs.py/*checkout*/fann/fannphp/fann.c?rev=1.13 > I would greatly appreciate any help :) > > > -- > Evan Nemerson > evan@coeus-group.com > http://coeusgroup.com/en

« previous php.pecl.dev (#1599) next »