lichtner/fluentpdo — pull request #21 by superaktieboy (2013-05-15 19:52:53+00:00)
Title: Adds an asObject()

A simple `asObject()` method that returns the results as an object. Accepts 1 parameter that can be a boolean or string. If it's true (default) it will return the items as `stdClass`, if it's a string, and the string contains the name of a class, it is return as that class.
E.g.:
```php
$query = $fpdo->from('users')->where('id = ?', '2')->asObject();
var_dump($query); // dump the results as stdClass
```
or
```php
$query = $fpdo->from('users')->where('id = ?', '2')->asObject('User');
var_dump($query); // dump the results as User
```

This uses the internal PDO mechanism for this.