Hi list,
A request for thoughts/advice if I may. I have an entity which I
wish to model, let's say for now it's a car. I want to be able to
use a 'car' object (or list of car objects) in my view. For example
$car->colour, $car->engineSize.
Now, some of the information my site presents about the car comes
from a SOAP web service running on another server, and some
additional information comes from a local MySQL database. I
understand all the Zend_Db_* classes and how I might use them to
model my database car info. But I'm not too sure how to create an
object that represents a car combining information from both the Web
Service and the database.
If for example I was to extend Zend_Db_Table_Row_Abstract to
represent the car, could I add additional public fields to hold the
data obtained through the Web Service without creating problems when
I use ->save and such methods?
Or would I perhaps be better creating a car class that doesn't extend
Zend_Db_Table_Row_Abstract. Then either use the basic Zend_Db
class's or extend them slightly to do the DB work for a car. Calling
the various find and save methods from the car class?
Thoughts?
Many thanks, Greg Frith.