coen-hyde / Shanty-Mongo

Shanty Mongo is a mongodb library for the Zend Framework. Its intention is to make working with mongodb documents as natural and as simple as possible. In particular allowing embedded documents to also have custom document classes.
Other
200 stars 52 forks source link

Collections inside Document "toArray" function #53

Closed webologen closed 12 years ago

webologen commented 12 years ago

I use the Shanty_Mongo_Document to extend my Model Classes. I wondered if a function exists like "toArray()"

I saw you store the raw array in your protected var "_cleanData"

For the moment i have to iterate through every object to gain the information i need. But for the REST webservice i develop it would be enough to response the raw data.

Any help would be nice.

coen-hyde commented 12 years ago

Yes. Use "export()";