vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ScalarHydrator.php line 33

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Doctrine\ORM\Internal\Hydration;
  4. /**
  5.  * Hydrator that produces flat, rectangular results of scalar data.
  6.  * The created result is almost the same as a regular SQL result set, except
  7.  * that column names are mapped to field names and data type conversions take place.
  8.  */
  9. class ScalarHydrator extends AbstractHydrator
  10. {
  11.     /**
  12.      * {@inheritdoc}
  13.      */
  14.     protected function hydrateAllData()
  15.     {
  16.         $result = [];
  17.         while ($data $this->statement()->fetchAssociative()) {
  18.             $this->hydrateRowData($data$result);
  19.         }
  20.         return $result;
  21.     }
  22.     /**
  23.      * {@inheritdoc}
  24.      */
  25.     protected function hydrateRowData(array $row, array &$result)
  26.     {
  27.         $result[] = $this->gatherScalarRowData($row);
  28.     }
  29. }