Convert a result set array to a result set object in PHP / Doctrine / ORM

I have a complicated SQL function that I can't seem to write in DQL (Doctrine's Query Language).  Unfortunately the only way to get a result set from raw SQL in Doctrine only produces a result set as an array.  My view uses an object, which is easier to iterate though, plus I don't have to go into the code and change all the objects to arrays.  

Is there a way in Doctrine or PHP to convert the array to an object result set?  

I could do it manually with a for loop and a stdClass, but I was hoping there was something more robust.  Perhaps it can be done in Doctrine, but I can't find anywhere in the API a way to get the result set as an object except by using DQL ,which is terrible for nested queries.
jpking72Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jpking72Author Commented:
I saw that actually but it doesn't work in Zend Framework.  It's looking for some sort of iterator I think.  I ended up just changing my view to arrays.  I guess that's the way it is if you're using raw PHP anyway.  What I should do is write a function that does that in Zend.
R-ByterCommented:
Sorry for not being able to help You with my previous post.

Regards
jpking72Author Commented:
Hey, I'll give you the points anyway.  After all, what you gave is actually a correct answer.
R-ByterCommented:
Thanks for the points. I appreciate Your attitude.

Regards
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.