[patch] ReflectionProperty::getLinenumber

php.internals

Johannes Schlueter

21 years ago
Hi, here's a patch which is lying around on my disk for quite a while: It adds a ReflectionProperty::getLinenumber()-Method to find the Linenumber where a property was defined. I wrote it while working on a little code-browser thing. This method corresponds to the already existing Reflection[Class| Function|Method]::get[Start|End]Line() Methods. As you can see I extended the zend_property_info structure to hold the linenumber. If an extension registers a property using zend_declare_property it is assumed that the property was defined at line 0. johannes The patch is also available at http://anonsvn.schlueters.de/svn/phpatches/HEAD/reflectionProperty_getLinenumber.diff
-- Johannes Schlüter schlueter@mayflower.de Mayflower GmbH / ThinkPHP Tel: 089 / 24 20 54 - 33 Sendlinger Str. 42a Fax: 089 / 24 20 54 - 29 80331 München http://www.mayflower.de