Re: Overloaded class registration
| From: | Marcus Boerger | Date: | Tue, 16 Nov 2004 21:32:55 +0000 |
| Subject: | Re: Overloaded class registration | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-13876@lists.php.net to get a copy of this message | ||
Hello Evan,
your implementation is wrong, you need to specify the arguments to
__get/__set.
best regards
marcus
Tuesday, November 16, 2004, 9:01:25 PM, you wrote:
> Hi everyone,
> I noticed recently that both of my extensions (Panda and FANN, both in PECL)
> emit error messages when their __get() and __set() methods are registered.
> The problem seems to be that fptr.common->num_args is always 0 in
> zend_check_magic_method_implementation(), regardless of what I set them to
> prior to registration.
> The functions still work perfectly, and valgrind doesn't complain. There's
> just an incredibly annoying error message every time. It's entirely possible
> (if not probable) that it's my code that's wrong, not ZE2, but I can't for
> the life of me figure it out.
> 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 tried pecl-dev last week, and the only suggestion I got was using the
> read_property and write_property callbacks instead of the __get() and
> __post() methods, but I don't really think that's an option. The thread is at
>
> http://marc.theaimsgroup.com/?l=pecl-dev&m=110012046408453&w=2
> Thanks.
> --
> Evan Nemerson
> evan@coeus-group.com
> http://coeusgroup.com/en
--
Best regards,
Marcus mailto:helly@php.net