%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64 User : addictionfreeind ( 1003) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system Directory : /home/addictionfreeind/www/admin1/vendor/doctrine/dbal/src/Driver/PgSQL/ |
Upload File : |
<?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;
}
}