Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:8113 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25167 invoked by uid 1010); 25 Feb 2004 07:57:01 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 25083 invoked from network); 25 Feb 2004 07:57:00 -0000 Received: from unknown (HELO mail.de-punkt.de) (62.4.81.205) by pb1.pair.com with SMTP; 25 Feb 2004 07:57:00 -0000 Received: (qmail 25205 invoked by uid 508); 25 Feb 2004 07:57:00 -0000 Received: from sb@sebastian-bergmann.de by webby by uid 511 with qmail-scanner-1.16 (f-prot: 3.12. spamassassin: 2.60. Clear:. Processed in 0.434019 secs); 25 Feb 2004 07:57:00 -0000 Received: from unknown (HELO wopr) (80.142.59.240) by mail.de-punkt.de with SMTP; 25 Feb 2004 07:56:59 -0000 Received: from localhost [127.0.0.1] by wopr (192.168.2.100) (userid 8) with Hamster-NewsToMail-Gate (Classic Hamster Version 2.0 Build 2.0.2.2) ; Wed, 25 Feb 2004 08:55:55 +0100 Date: Wed, 25 Feb 2004 08:55:54 +0100 Organization: www.sebastian-bergmann.de User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en To: internals@lists.php.net Sender: admin Lines: 33 X-Qmail-Scanner-Message-ID: <107769582052625199@webby> Subject: Suggestions for Reflection API From: sebastian@php.net (Sebastian Bergmann) Message-ID: Hi, I just looked for the first time in months at the Reflection API and have two suggestions: 1.) There are a couple of methods that throw an Exception. I think it would be better to introduce a Reflection_Exception class that is thrown instead of the standard Exception. If possible, it might be a good idea to only allow throwing Reflection_Exception instances to the internal Reflection_* classes. 2.) getVersion() is currently only declared for Reflection_Extension. I think it would be nice if we had versioning for classes and methods available through the Reflection API, too. This could be achieved, for instance, by either introducing yet another __-prepended property (const $__version = '1.0.0', for example) or by using metadata in doc-comments (@version 1.0.0). This would solve the versioning problem that is currently discussed on the pear-dev list, IMHO. Greetings, Sebastian -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/