Cake\Database\ValueBinder::generateManyNamed PHP Метод

generateManyNamed() публичный Метод

Creates unique named placeholders for each of the passed values and binds them with the specified type.
public generateManyNamed ( array | Traversable $values, string $type = 'string' ) : array
$values array | Traversable The list of values to be bound
$type string The type with which all values will be bound
Результат array with the placeholders to insert in the query
    public function generateManyNamed($values, $type = 'string')
    {
        $placeholders = [];
        foreach ($values as $k => $value) {
            $param = ":c" . $this->_bindingsCount;
            $this->_bindings[$param] = ['value' => $value, 'type' => $type, 'placeholder' => substr($param, 1)];
            $placeholders[$k] = $param;
            $this->_bindingsCount++;
        }
        return $placeholders;
    }