diff -r 000000000000 -r 7f95f8617b0b vendor/doctrine/lib/Doctrine/ORM/Internal/Hydration/ScalarHydrator.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/doctrine/lib/Doctrine/ORM/Internal/Hydration/ScalarHydrator.php Sat Sep 24 15:40:41 2011 +0200 @@ -0,0 +1,50 @@ +. + */ + +namespace Doctrine\ORM\Internal\Hydration; + +use Doctrine\DBAL\Connection; + +/** + * Hydrator that produces flat, rectangular results of scalar data. + * The created result is almost the same as a regular SQL result set, except + * that column names are mapped to field names and data type conversions take place. + * + * @author Roman Borschel + * @since 2.0 + */ +class ScalarHydrator extends AbstractHydrator +{ + /** @override */ + protected function _hydrateAll() + { + $result = array(); + $cache = array(); + while ($data = $this->_stmt->fetch(\PDO::FETCH_ASSOC)) { + $result[] = $this->_gatherScalarRowData($data, $cache); + } + return $result; + } + + /** @override */ + protected function _hydrateRow(array $data, array &$cache, array &$result) + { + $result[] = $this->_gatherScalarRowData($data, $cache); + } +} \ No newline at end of file