Google\Cloud\Datastore\Query\GqlQuery::mapBindings PHP Method

mapBindings() private method

Format bound values for the API
private mapBindings ( string $bindingType, array $bindings ) : array
$bindingType string Either named or positional bindings.
$bindings array The bindings to map
return array
    private function mapBindings($bindingType, array $bindings)
    {
        $res = [];
        foreach ($bindings as $key => $binding) {
            $value = $this->entityMapper->valueObject($binding);
            if ($bindingType === self::BINDING_NAMED) {
                $res[$key] = ['value' => $value];
            } else {
                $res[] = ['value' => $value];
            }
        }
        return $res;
    }