Suggestions for Reflection API

From: Date: Wed, 25 Feb 2004 07:55:54 +0000
Subject: Suggestions for Reflection API
Groups: php.internals 
Request: Send a blank email to internals+get-8113@lists.php.net to get a copy of this message
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/

« previous php.internals (#8113) next »