Szymon Wilkołazki wrote:
>
> Then you have your model doing just Business Logic, and it doesn't
> have to care about database logic.
>
Hi,
this is the way I would like to do.
Here comes the initial problem though.
The dataStore (a Zend_Db_table, an interface, or whatever) used by my
Business Object now actually uses a Zend_Db to fetch records.
When it fetches a single or a collections of records, ie articles, I have
such records in the form of array or stdClass.
In the case I use a Zend_Db_Table dataStore inside my Business Object, I
would have returned a set of, say, Article_Record (where Article_Record
extends Zend_Db_Table).
I would need to trasform them (arrays, stdClass or Article_Record), into
Article class objects if I want them to have behaviour and actually be my
real business object Article.
Hope I explained clearly in the last passage.
How would you manage this ?
:)
--
View this message in context:
http://www.nabble.com/Object-Oriented-and-dealing-with-array-coming-from-Zend_Db-and-Zend_Form-tp18142182p18152584.html
Sent from the Zend Framework mailing list archive at Nabble.com.