PubSub/src/Snapshot.php
public function create(array $options = [])
    {
        if (!$this->info['subscription']) {
            throw new \BadMethodCallException('A subscription is required to create a snapshot.');
        }

        return $this->info = $this->connection->createSnapshot([
            'project' => $this->formatName('project', $this->projectId),
            'name' => $this->name,
            'subscription' => $this->info['subscription']
        ]);
    }
public function create(array $options = [])
    {
        if (!$this->info['subscription']) {
            throw new \BadMethodCallException('A subscription is required to create a snapshot.');
        }

        return $this->info = $this->connection->createSnapshot([
            'project' => $this->formatName('project', $this->projectId),
            'name' => $this->name,
            'subscription' => $this->info['subscription']
        ]);
    }
public function create ( array $ options = [ ] ) { if ( ! $ this -> info [ 'subscription' ] ) { throw new \ BadMethodCallException ( 'A subscription is required to create a snapshot.' ) ; } return $ this -> info = $ this -> connection -> createSnapshot ( [ 'project' => $ this -> formatName ( 'project' , $ this -> projectId ) , 'name' => $ this -> name , 'subscription' => $ this -> info [ 'subscription' ] ] ) ; }
Create a new Snapshot.

When creating a snapshot, a subscription name must be supplied at
instantiation.

Please note that this method may not yet be available in your project.

Example:
```
$info = $snapshot->create();
```

@param array $options [optional] Configuration options.
@return array
@throws \BadMethodCallException If a subscription name cannot be found.
Create a new Snapshot .