AbstractHydrator.php
9 months ago
ArrayHydrator.php
9 months ago
HydrationException.php
9 months ago
IterableResult.php
9 months ago
ObjectHydrator.php
9 months ago
ScalarColumnHydrator.php
9 months ago
ScalarHydrator.php
9 months ago
SimpleObjectHydrator.php
9 months ago
SingleScalarHydrator.php
9 months ago
index.php
9 months ago
ScalarColumnHydrator.php
20 lines
| 1 | <?php |
| 2 | declare (strict_types=1); |
| 3 | namespace MailPoetVendor\Doctrine\ORM\Internal\Hydration; |
| 4 | if (!defined('ABSPATH')) exit; |
| 5 | use MailPoetVendor\Doctrine\DBAL\Driver\Exception; |
| 6 | use MailPoetVendor\Doctrine\ORM\Exception\MultipleSelectorsFoundException; |
| 7 | use function array_column; |
| 8 | use function count; |
| 9 | final class ScalarColumnHydrator extends AbstractHydrator |
| 10 | { |
| 11 | protected function hydrateAllData() : array |
| 12 | { |
| 13 | if (count($this->resultSetMapping()->fieldMappings) > 1) { |
| 14 | throw MultipleSelectorsFoundException::create($this->resultSetMapping()->fieldMappings); |
| 15 | } |
| 16 | $result = $this->statement()->fetchAllNumeric(); |
| 17 | return array_column($result, 0); |
| 18 | } |
| 19 | } |
| 20 |