ZF-7349: Zend_Reflection_File does not reflect interfaces. Zend_CodeGenerator cannot generate interfaces.
Description
The tokenizer in Zend_Reflection_File ignores T_INTERFACE so it is not possible to reflect interfaces within files at the moment. Zend_Reflection_Class inherits ReflectionClass thus it should be possible to reflect interfaces.
Zend_CodeGenerator_Php_Class assumes that Zend_Reflection_Class is always a class. So it is not possible to generate an interface.
Comments
Posted by Ralph Schindler (ralph) on 2009-08-07T08:54:22.000+0000
Fixed in r17426 in trunk
Posted by RĂ¼diger Krieg (dbc_rkrieg) on 2009-08-07T09:37:23.000+0000
Your fix for Zend_Reflection_File is fine.
The other part of the issue concerning Zend_CodeGenerator_Class seems to be still existing. Shall I open another issue for that?
The problem is that Zend_CodeGenerator assumes that Zend_Reflection_Class is always a class not an interface. If you try to generate an interface with Zend_CodeGenerator_File parsed via Zend_Reflection_File you will encounter some problems.
Zend_CodeGenerator_File::fromReflection() does not set the filename. I think
will fix that.