![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/medad.corals.io/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/ |
<?php declare(strict_types=1); namespace Doctrine\DBAL\Driver; /** * @internal */ final class FetchUtils { /** * @return mixed|false * * @throws Exception */ public static function fetchOne(Result $result) { $row = $result->fetchNumeric(); if ($row === false) { return false; } return $row[0]; } /** * @return array<int,array<int,mixed>> * * @throws Exception */ public static function fetchAllNumeric(Result $result): array { $rows = []; while (($row = $result->fetchNumeric()) !== false) { $rows[] = $row; } return $rows; } /** * @return array<int,array<string,mixed>> * * @throws Exception */ public static function fetchAllAssociative(Result $result): array { $rows = []; while (($row = $result->fetchAssociative()) !== false) { $rows[] = $row; } return $rows; } /** * @return array<int,mixed> * * @throws Exception */ public static function fetchFirstColumn(Result $result): array { $rows = []; while (($row = $result->fetchOne()) !== false) { $rows[] = $row; } return $rows; } }