Property | Type | Description | |
---|---|---|---|
$connection | Google\Cloud\Storage\Connection\ConnectionInterface | Represents a connection to Storage. |
Method | Description | |
---|---|---|
__construct ( array $config = [] ) | Create a Storage client. | |
bucket ( string $name ) : |
Lazily instantiates a bucket. There are no network requests made at this point. To see the operations that can be performed on a bucket please see {@see Google\Cloud\Storage\Bucket}. | |
buckets ( array $options = [] ) : Generator |
Fetches all buckets in the project. | |
createBucket ( string $name, array $options = [] ) : |
Create a bucket. Bucket names must be unique as Cloud Storage uses a flat namespace. For more information please see bucket name requirements |
public __construct ( array $config = [] ) | ||
$config | array | [optional] { Configuration options. @type string $projectId The project ID from the Google Developer's Console. @type CacheItemPoolInterface $authCache A cache used storing access tokens. **Defaults to** a simple in memory implementation. @type array $authCacheOptions Cache configuration options. @type callable $authHttpHandler A handler used to deliver Psr7 requests specifically for authentication. @type callable $httpHandler A handler used to deliver Psr7 requests. Only valid for requests sent over REST. @type string $keyFile The contents of the service account credentials .json file retrieved from the Google Developers Console. @type string $keyFilePath The full path to your service account credentials .json file retrieved from the Google Developers Console. @type int $retries Number of retries for a failed request. **Defaults to** `3`. @type array $scopes Scopes to be used for the request. } |
public buckets ( array $options = [] ) : Generator |
||
$options | array | [optional] { Configuration options. @type integer $maxResults Maximum number of results to return per request. @type string $prefix Filter results with this prefix. @type string $projection Determines which properties to return. May be either 'full' or 'noAcl'. @type string $fields Selector which will cause the response to only return the specified fields. } |
return | Generator |
public createBucket ( string $name, array $options = [] ) : |
||
$name | string | Name of the bucket to be created. |
$options | array | [optional] { Configuration options. @type string $predefinedAcl Apply a predefined set of access controls to this bucket. @type string $predefinedDefaultObjectAcl Apply a predefined set of default object access controls to this bucket. @type string $projection Determines which properties to return. May be either 'full' or 'noAcl'. @type string $fields Selector which will cause the response to only return the specified fields. @type array $acl Access controls on the bucket. @type array $cors The bucket's Cross-Origin Resource Sharing (CORS) configuration. @type array $defaultObjectAcl Default access controls to apply to new objects when no ACL is provided. @type array $lifecycle The bucket's lifecycle configuration. @type string $location The location of the bucket. **Defaults to** `"US"`. @type array $logging The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. @type string $storageClass The bucket's storage class. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, STANDARD and DURABLE_REDUCED_AVAILABILITY. @type array $versioning The bucket's versioning configuration. @type array $website The bucket's website configuration. } |
return |