Value binder class manages list of values bound to conditions.
array
Array containing a list of bound values to the conditions on this object. Each array entry is another array structure containing the actual bound value, its type and the placeholder it is bound to.
int
A counter of the number of parameters bound in this expression object
Creates unique named placeholders for each of the passed values and binds them with the specified type.
Creates a unique placeholder name if the token provided does not start with ":" otherwise, it will return the same string and internally increment the number of placeholders generated by this object.
attachTo(\Cake\Database\StatementInterface $statement)
Binds all the stored values in this object to the passed statement.
\Cake\Database\StatementInterface
$statement The statement to add parameters to.
bind(mixed $param, mixed $value, mixed $type)
Associates a query placeholder to a value and a type
string|int
$param placeholder to be replaced with quoted version of $value
mixed
$value The value to be bound
string|int|null
$type optional the mapped type name, used for casting when sending to database
bindings()
Returns all values bound to this expression object at this nesting level.
Subexpression bound values will not be returned with this function.
array
generateManyNamed(iterable $values, mixed $type)
Creates unique named placeholders for each of the passed values and binds them with the specified type.
iterable
$values The list of values to be bound
string|int|null
$type optional The type with which all values will be bound
array
with the placeholders to insert in the query
placeholder(string $token)
Creates a unique placeholder name if the token provided does not start with ":" otherwise, it will return the same string and internally increment the number of placeholders generated by this object.
string
$token string from which the placeholder will be derived from, if it starts with a colon, then the same string is returned
string
to be used as a placeholder in a query expression
reset()
Clears any bindings that were previously registered
resetCount()
Resets the bindings count without clearing previously bound values
Array containing a list of bound values to the conditions on this object. Each array entry is another array structure containing the actual bound value, its type and the placeholder it is bound to.
array
A counter of the number of parameters bound in this expression object
int
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.1/class-Cake.Database.ValueBinder.html