Reproduce the functionality of mysql_fetch_object()
<p>I'm trying to reproduce the functionality of <code>mysql_fetch_object()</code>. If I understand well, what it does is returns the MySQL query as an object of stdClass if you no param or of another class if you give it.</p>

<p>I say I need to reproduce because I need to hack a class to do this thing with Mongo. I explain myself.</p>

<p>I get results from Mongo actually as an array, I need them to retrive it as an stdClass or a class I pass to this function. How I can do it?</p>

<p>Thank you in advance</p>
