Index

Binds

MMO\pdo\statements · 1 symbol · generated 5 Oct 2026

class

Binds

Binds.php:29

The ordered list of values a render actually emitted a ? placeholder for.

class MMO\pdo\statements\Binds implements Countable, IteratorAggregate
Namespace
MMO\pdo\statements
Implements
Countable, IteratorAggregate
See
PDOPrinter::bind() fills it, Statement::prepare() creates it and consumes it
A statement's bindings CANNOT be derived by walking its content: only the printer knows which values end up as a `?` (an identifier renders as `` `name` ``, a raw fragment renders verbatim, and a `$in` array expands to one `?` per item). So the printer itself records them here, in emission order, while it renders. This is an object on purpose: it travels inside the printer's `$options` array, which is passed by value all the way down, so only a shared handle survives the trip (same trick as `$options['hashes']`).

Properties1

values

protected array $values = []
Type
array

Methods5

add($value, $type)

Binds.php:40

Record a value, in emission order.

function add(mixed $value, ?string $type = null): string
$valuemixedthe value to bind
$type = nullnull | stringa Statement::bindValue type hint ('int', 'bool', 'blob', …), or null to let the binder infer it from the value
returnsstringalways '?', so an exporter can return $binds->add($value);

toArray()

Binds.php:50
function toArray(): array
returnsarrayarray{0: mixed, 1: ?string}>