Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Zend_Amf
-
Labels:None
Description
The current implementation of mapping php classes to AS with either $_explicitType or getASClassName() seems pretty awkward to me. It adds members specific for amf to the classes which are meant to be most generic, VOs that is.
What I mean is that these classes can be heavily utilized by other services and inside php. So if every service It's meant for will require utilization of specific members, imagine what a mess it can make out of what is meant to be a simplest object.
What I suggest is to implement annotations parsing by means of Reflection. So that in the end it would look like:
/**
* @ASClass{name=ContactVO}
*/
class Contact
{
public $id;
public $name;
public $email;
}
I really like this idea and something similar was part of the initial proposal. The issue that we had was that we really wanted to be able to cache the lookup the reflected lookup table for subsequent requests. We were worried about performance but is something that I hope we can add after the 1.8 release.