views:

52

answers:

1

Typically, Magento's models are "backed" by a MySQL database--this is where the data comes from, and is persisted to. How can I get the data from a standard PHP array? Is there some sample code available anywhere? (I'm especially interested in the "reading" aspect at the moment, but it would be useful to know how to "write" too.)

A: 

Internally magento stores all the data in a local _data variable in each object. You could easily add your data to that (fx. using the addData method).

Janus Tøndering