Google\Cloud\Storage\Bucket::delete PHP Method

delete() public method

Example: $bucket->delete();
See also: https://cloud.google.com/storage/docs/json_api/v1/buckets/delete Buckets delete API documentation.
public delete ( array $options = [] ) : void
$options array [optional] { Configuration options. @type string $ifMetagenerationMatch If set, only deletes the bucket if its metageneration matches this value. @type string $ifMetagenerationNotMatch If set, only deletes the bucket if its metageneration does not match this value. }
return void
    public function delete(array $options = [])
    {
        $this->connection->deleteBucket($options + $this->identity);
    }

Usage Example

Exemplo n.º 1
0
 public function testDelete()
 {
     $bucket = new Bucket($this->connection->reveal(), 'bucket');
     $this->assertNull($bucket->delete());
 }