Spanner/src/Batch/BatchClient.php
public function snapshot(array $options = [])
    {
        $options += [
            'transactionOptions' => [],
        ];

        // Single Use transactions are not supported in batch mode.
        $options['transactionOptions']['singleUse'] = false;

        $transactionOptions = $this->pluck('transactionOptions', $options);
        $transactionOptions['returnReadTimestamp'] = true;

        $transactionOptions = $this->configureSnapshotOptions($transactionOptions);

        $session = $this->operation->createSession(
            $this->databaseName,
            $this->pluck('sessionOptions', $options, false) ?: []
        );

        return $this->operation->snapshot($session, [
            'className' => BatchSnapshot::class,
            'transactionOptions' => $transactionOptions
        ] + $options);
    }
public function snapshot(array $options = [])
    {
        $options += [
            'transactionOptions' => [],
        ];

        // Single Use transactions are not supported in batch mode.
        $options['transactionOptions']['singleUse'] = false;

        $transactionOptions = $this->pluck('transactionOptions', $options);
        $transactionOptions['returnReadTimestamp'] = true;

        $transactionOptions = $this->configureSnapshotOptions($transactionOptions);

        $session = $this->operation->createSession(
            $this->databaseName,
            $this->pluck('sessionOptions', $options, false) ?: []
        );

        return $this->operation->snapshot($session, [
            'className' => BatchSnapshot::class,
            'transactionOptions' => $transactionOptions
        ] + $options);
    }
public function snapshot ( array $ options = [ ] ) { $ options += [ 'transactionOptions' => [ ] , ] ; // Single Use transactions are not supported in batch mode. $ options [ 'transactionOptions' ] [ 'singleUse' ] = false ; $ transactionOptions = $ this -> pluck ( 'transactionOptions' , $ options ) ; $ transactionOptions [ 'returnReadTimestamp' ] = true ; $ transactionOptions = $ this -> configureSnapshotOptions ( $ transactionOptions ) ; $ session = $ this -> operation -> createSession ( $ this -> databaseName , $ this -> pluck ( 'sessionOptions' , $ options , false ) ? : [ ] ) ; return $ this -> operation -> snapshot ( $ session , [ 'className' => BatchSnapshot :: class , 'transactionOptions' => $ transactionOptions ] + $ options ) ; }
Create a batch snapshot.

Example:
```
$snapshot = $batch->snapshot();
```

@param array $options [optional] {
Configuration Options

See [ReadOnly](https://cloud.google.com/spanner/reference/rpc/google.spanner.v1#google.spanner.v1.TransactionOptions.ReadOnly)
for detailed description of available options.

@type bool $transactionOptions.strong Read at a timestamp where all previously committed
transactions are visible.
@type Timestamp $transactionOptions.readTimestamp Executes all reads at the given
timestamp.
@type Duration $transactionOptions.exactStaleness Represents a number of seconds. Executes
all reads at a timestamp that is $exactStaleness old.
@type array $sessionOptions Configuration options for session creation.
}
@return BatchSnapshot
Create a batch snapshot .