Datastore/src/Transaction.php
public function updateBatch(array $entities, array $options = [])
    {
        $options += [
            'allowOverwrite' => false
        ];

        $this->operation->checkOverwrite($entities, $options['allowOverwrite']);
        foreach ($entities as $entity) {
            $this->mutations[] = $this->operation->mutation('update', $entity, Entity::class);
        }

        return $this;
    }
public function updateBatch(array $entities, array $options = [])
    {
        $options += [
            'allowOverwrite' => false
        ];

        $this->operation->checkOverwrite($entities, $options['allowOverwrite']);
        foreach ($entities as $entity) {
            $this->mutations[] = $this->operation->mutation('update', $entity, Entity::class);
        }

        return $this;
    }
public function updateBatch ( array $ entities , array $ options = [ ] ) { $ options += [ 'allowOverwrite' => false ] ; $ this -> operation -> checkOverwrite ( $ entities , $ options [ 'allowOverwrite' ] ) ; foreach ( $ entities as $ entity ) { $ this -> mutations [ ] = $ this -> operation -> mutation ( 'update' , $ entity , Entity :: class ) ; } return $ this ; }
Update multiple entities.

Changes are not immediately committed to Cloud Datastore when calling
this method. Use {@see Google\Cloud\Datastore\Transaction::commit()} to
commit changes and end the transaction.

Example:
```
$entities[0]['firstName'] = 'Bob';
$entities[1]['firstName'] = 'John';

$transaction->updateBatch($entities);
$transaction->commit();
```

@param EntityInterface[] $entities The entities to update.
@param array $options [optional] {
Configuration Options

@type bool $allowOverwrite Entities must be updated as an entire
resource. Patch operations are not supported. Because entities
can be created manually, or obtained by a lookup or query, it
is possible to accidentally overwrite an existing record with a
new one when manually creating an entity. To provide additional
safety, this flag must be set to `true` in order to update a
record when the entity provided was not obtained through a
lookup or query. **Defaults to** `false`.
}
@return Transaction
Update multiple entities .