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

info() public method

Example: $info = $bucket->info(); echo $info['location'];
See also: https://cloud.google.com/storage/docs/json_api/v1/buckets/get Buckets get API documentation.
public info ( array $options = [] ) : array
$options array [optional] { Configuration options. @type string $ifMetagenerationMatch Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value. @type string $ifMetagenerationNotMatch Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value. @type string $projection Determines which properties to return. May be either 'full' or 'noAcl'. }
return array
    public function info(array $options = [])
    {
        if (!$this->info) {
            $this->reload($options);
        }
        return $this->info;
    }

Usage Example

コード例 #1
0
 public function testGetsInfoWithForce()
 {
     $bucketInfo = ['name' => 'bucket', 'etag' => 'ABC', 'kind' => 'storage#bucket'];
     $this->connection->getBucket(Argument::any())->willReturn($bucketInfo)->shouldBeCalledTimes(1);
     $bucket = new Bucket($this->connection->reveal(), 'bucket');
     $this->assertEquals($bucketInfo, $bucket->info());
 }