Re: print_r unaware of object's read_property handler
| From: | Pierre | Date: | Fri, 16 Feb 2007 10:51:10 +0000 |
| Subject: | Re: print_r unaware of object's read_property handler | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-4555@lists.php.net to get a copy of this message | ||
hi,
On 2/16/07, Piotr Pokora <piotrek.pokora@gmail.com> wrote:
pierre.php@gmail.com (Pierre) wrote: GObject is one project and does not dictate how to deal with pseudo OO in C to any other applications. I'm not saying it is bad or good only stating a fact. You cannot expect anyone here to be familiar with GObject (or midgard for that matter). And you can not expect that no zend-dev guy imagine a big picture of zend internals :). I use GObject in some of my private extensions (check php-GTK for public code, it certainly has some gobject usages as well), it works for extended classes, print_r, var_dump, etc. ZE1 or ZE2 ? But you have to implement almost all handlers. It doesn't matter. I can add them all. To add them all I need to know where to avoid traps.Let me redefine the notion of "simple example" :) : - two src files: gobject.c php_gobject.h - config.m4 - php5 only. No I do not think anyone thinks it is sane to start new extensions with php4 in mind, especially not when you want OO. If one can run phpize, configure and start to play with it in 20sec, it fits in my "simple example" definition and we will have something to discuss. Something to optimize, patch, explain, etc.I just wrote simple test. it looks like this (briefly):Why don't you put a really simple, complete and working test online so we have a common base to discuss? Including the userland code to show what you try to achieve. http://midgard.tigris.org/source/browse/midgard/src/apis/php4/php_midgard_gobject_generic.c?rev=1.5&view=markup http://midgard.tigris.org/source/browse/midgard/src/apis/php4/php_midgard_config.c?rev=1.4&view=markup Those do not include get_properties handler. I added this one locally to see how often get_properies is called. To get some idea how it should work and what it shouldn't do.