Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:3039 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77339 invoked from network); 30 Jun 2003 15:00:22 -0000 Received: from unknown (HELO mail.zend.com) (192.117.235.230) by pb1.pair.com with SMTP; 30 Jun 2003 15:00:22 -0000 Received: (qmail 5482 invoked from network); 30 Jun 2003 15:00:20 -0000 Received: from localhost (HELO andi-home.zend.com) (127.0.0.1) by localhost with SMTP; 30 Jun 2003 15:00:20 -0000 Message-ID: <5.1.0.14.2.20030630180214.034a5ea8@127.0.0.1> X-Sender: andi@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Mon, 30 Jun 2003 18:04:14 +0200 To: George Schlossnagle ,internals@lists.php.net In-Reply-To: <79FAA76A-AA66-11D7-8C6F-000393B2B3C0@omniti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] Reflection API From: andi@zend.com (Andi Gutmans) References: <79FAA76A-AA66-11D7-8C6F-000393B2B3C0@omniti.com> I must be thick. I don't quite understand how the source relates to what is described in the .png. Take for example the following from the api.c file: static zend_function_entry php_function_functions[] = { ZEND_FE(php_function, NULL) ZEND_FE(php_function_isinternal, NULL) ZEND_FALIAS(isinternal, php_function_isinternal, NULL) ZEND_FE(php_function_isuserdefined, NULL) ZEND_FALIAS(isuserdefined, php_function_isinternal, NULL) ZEND_FE(php_function_getname, NULL) ZEND_FALIAS(getname, php_function_getname, NULL) ZEND_FE(php_function_getfilename, NULL) ZEND_FALIAS(getfilename, php_function_getfilename, NULL) ZEND_FE(php_function_getstartline, NULL) ZEND_FALIAS(getstartline, php_function_getstartline, NULL) ZEND_FE(php_function_getendline, NULL) ZEND_FALIAS(getendline, php_function_getendline, NULL) ZEND_FE(php_function_getdoccomment, NULL) ZEND_FALIAS(getdoccomment, php_function_getdoccomment, NULL) ZEND_FE(php_function_getstaticvariables, NULL) ZEND_FALIAS(getstaticvariables, php_function_getstaticvariables, NULL) ZEND_FE(php_function_invoke, NULL) ZEND_FALIAS(invoke, php_function_invoke, NULL) {NULL, NULL, NULL} Are these functions meant to be called by the user? They are *pretty* ugly. Can you show a small piece of example code on how this reflection API is supposed to be used? Once we make sure it looks good to everyone I have no problem with you commiting your work. Andi At 03:18 PM 29/6/2003 -0400, George Schlossnagle wrote: >Here is a first implementation of the reflection api, for functions (class >PHP_Function in you diagram) > >http://www.schlossnagle.org/~george/php/reflection.diff >http://www.schlossnagle.org/~george/php/zend_reflection_api.c >http://www.schlossnagle.org/~george/php/zend_reflection_api.h > >Comments? Thoughts? >George > > >On Wednesday, June 18, 2003, at 12:53 PM, Sebastian Bergmann wrote: > >>Sebastian Bergmann wrote: >>>http://www.sebastian-bergmann.de/stuff/reflection.png >> >> I refactored it a bit: >> >> http://www.sebastian-bergmann.de/stuff/reflection-update.png >> >> IMHO it is essential that PHP_Field and PHP_Method implement a >> common interface (like their counterparts from java.lang.reflect do) >> to ease iterating through a class's members, for instance. >> >>-- >> Sebastian Bergmann >> http://sebastian-bergmann.de/ >>http://phpOpenTracker.de/ >> >> http://www.professionelle-softwareentwicklung-mit-php5.de/ >> >>-- >>PHP 5 Development Mailing List (http://www.php.net/) >>To unsubscribe, visit: http://www.php.net/unsub.php >> >-- George Schlossnagle >-- Principal Consultant >-- OmniTI Computer Consulting, Inc. >-- +1.410.872.4910 x202 >-- 1024D/1100A5A0 1370 F70A 9365 96C9 2F5E 56C2 B2B9 262F 1100 A5A0 > > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php