JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $columnNames The names of the result columns. Must be non-empty. * @param list> $rows The rows of the result. Each row must have the same number of columns * as the number of column names. */ public function __construct( private readonly array $columnNames, private array $rows, ) { } public function fetchNumeric(): array|false { return $this->fetch(); } public function fetchAssociative(): array|false { $row = $this->fetch(); if ($row === false) { return false; } return array_combine($this->columnNames, $row); } public function fetchOne(): mixed { $row = $this->fetch(); if ($row === false) { return false; } return $row[0]; } /** * {@inheritDoc} */ public function fetchAllNumeric(): array { return FetchUtils::fetchAllNumeric($this); } /** * {@inheritDoc} */ public function fetchAllAssociative(): array { return FetchUtils::fetchAllAssociative($this); } /** * {@inheritDoc} */ public function fetchFirstColumn(): array { return FetchUtils::fetchFirstColumn($this); } public function rowCount(): int { return count($this->rows); } public function columnCount(): int { return count($this->columnNames); } public function getColumnName(int $index): string { return $this->columnNames[$index] ?? throw InvalidColumnIndex::new($index); } public function free(): void { $this->rows = []; } /** @return array{list, list>} */ public function __serialize(): array { return [$this->columnNames, $this->rows]; } /** @param mixed[] $data */ public function __unserialize(array $data): void { // Handle objects serialized with DBAL 4.1 and earlier. if (isset($data["\0" . self::class . "\0data"])) { /** @var list> $legacyData */ $legacyData = $data["\0" . self::class . "\0data"]; $this->columnNames = array_keys($legacyData[0] ?? []); $this->rows = array_map(array_values(...), $legacyData); return; } [$this->columnNames, $this->rows] = $data; } /** @return list|false */ private function fetch(): array|false { if (! isset($this->rows[$this->num])) { return false; } return $this->rows[$this->num++]; } }