final class EscapeCursor
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

Tracks the source position and operand context while escaping PDO placeholders.

Properties§

public int $position = 0

Next byte to inspect in the original SQL.

public string $result = ''

Escaped SQL accumulated so far.

public bool $expectsOperand = true

Whether a question mark at the current position is a placeholder.

public string $sql

Methods§

public function __construct(public string $sql)

Retains the source SQL while escaping its operator tokens.

Parameters

$sqlstring
public function preserve(int $length): void

Preserves the next source span and advances the scanner.

Parameters

$lengthint
Test cases 3
Called from 11
Calls 1

Test cases 8§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1
Other tests reaching this symbol 7

Relations§

Instantiated in 1
Method calls 11
Type declarations 4