Zend_Entity looks promising so I dove into it today and was trying to figure
out how to map my existing model-driven ORM architecture into it. My
experimental goal is to use Entity as the (fatter) bottom layer of my base
"Model" class and replace my abstracted CRUD methods, which currently call
Db_Table, with abstracted Entity methods.

My application determines its list of object properties at run time, based
on the user's role and the action. As mentioned, the base Model class uses
Db_Table for CRUD, but I'd like it to instead call a stub class for each
entity and then dynamically build the Entity class based on the dynamic list
of properties which of course are a subset of the metadata defs. The stub
class will allow for easily overriding or adding to abstract methods if
needed.

So I need to be able to dynamically set the property list in Zend_Entity,
perhaps in the constructor or by iterating over the properties and calling
setters and getters as needed. My preference of course is that method names
in Entity allow for complete abstraction, so that all calls can be
abstracted into my base Model class (or at least as many as possible).

It appears that this is currently doable, even encouraged, but I'd like to
make sure this is an expected use of Zend_Entity so I don't run into
incompatibilities later.
Is this an expected use? Any comments on this approach?

Thanks,
Chris
-- 
View this message in context: 
http://www.nabble.com/Zend_Entity%3A-Using-it-in-a-fully-model-driven-manner-tp25374495p25374495.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to