Spanner/src/Operation.php
public function createSnapshot(Session $session, array $res = [], $className = Snapshot::class)
    {
        $res += [
            'id' => null,
            'readTimestamp' => null
        ];

        if ($res['readTimestamp']) {
            if (!($res['readTimestamp'] instanceof Timestamp)) {
                $time = $this->parseTimeString($res['readTimestamp']);
                $res['readTimestamp'] = new Timestamp($time[0], $time[1]);
            }
        }

        return new $className($this, $session, $res);
    }
public function createSnapshot(Session $session, array $res = [], $className = Snapshot::class)
    {
        $res += [
            'id' => null,
            'readTimestamp' => null
        ];

        if ($res['readTimestamp']) {
            if (!($res['readTimestamp'] instanceof Timestamp)) {
                $time = $this->parseTimeString($res['readTimestamp']);
                $res['readTimestamp'] = new Timestamp($time[0], $time[1]);
            }
        }

        return new $className($this, $session, $res);
    }
public function createSnapshot ( Session $ session , array $ res = [ ] , $ className = Snapshot :: class ) { $ res += [ 'id' => null , 'readTimestamp' => null ] ; if ( $ res [ 'readTimestamp' ] ) { if ( ! ( $ res [ 'readTimestamp' ] instanceof Timestamp ) ) { $ time = $ this -> parseTimeString ( $ res [ 'readTimestamp' ] ) ; $ res [ 'readTimestamp' ] = new Timestamp ( $ time [ 0 ] , $ time [ 1 ] ) ; } } return new $ className ( $ this , $ session , $ res ) ; }
Create a Snapshot instance from a response object.

@param Session $session The session the snapshot belongs to.
@param array $res [optional] The createTransaction response.
@param string $className [optional] The class to instantiate with a
snapshot. **Defaults to** `Google\Cloud\Spanner\Snapshot`.
@return Snapshot
Create a Snapshot instance from a response object .