![]() 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/mcoil.corals.io/vendor/doctrine/dbal/src/Driver/PgSQL/ |
<?php declare(strict_types=1); namespace Doctrine\DBAL\Driver\PgSQL; use Doctrine\DBAL\SQL\Parser\Visitor; use function count; use function implode; final class ConvertParameters implements Visitor { /** @var list<string> */ private array $buffer = []; /** @var array<array-key, int> */ private array $parameterMap = []; public function acceptPositionalParameter(string $sql): void { $position = count($this->parameterMap) + 1; $this->parameterMap[$position] = $position; $this->buffer[] = '$' . $position; } public function acceptNamedParameter(string $sql): void { $position = count($this->parameterMap) + 1; $this->parameterMap[$sql] = $position; $this->buffer[] = '$' . $position; } public function acceptOther(string $sql): void { $this->buffer[] = $sql; } public function getSQL(): string { return implode('', $this->buffer); } /** @return array<array-key, int> */ public function getParameterMap(): array { return $this->parameterMap; } }