2017 © Pedro Peláez
 

library cloud-storage

Cloud Storage Client for PHP

image

google/cloud-storage

Cloud Storage Client for PHP

  • Thursday, July 19, 2018
  • by bshaffer
  • Repository
  • 40 Watchers
  • 22 Stars
  • 234,043 Installations
  • PHP
  • 19 Dependents
  • 6 Suggesters
  • 3 Forks
  • 0 Open issues
  • 21 Versions
  • 58 % Grown

The README.md

Google Cloud Storage for PHP

Idiomatic PHP client for Cloud Storage., (*1)

Latest Stable Version Packagist, (*2)

NOTE: This repository is part of Google Cloud PHP. Any support requests, bug reports, or development contributions should be directed to that project., (*3)

Allows world-wide storage and retrieval of any amount of data at any time. You can use Cloud Storage for a range of scenarios including serving website content, storing data for archival and disaster recovery, or distributing large data objects to users via direct download., (*4)

Installation

To begin, install the preferred dependency manager for PHP, Composer., (*5)

Now install this component:, (*6)

$ composer require google/cloud-storage

Authentication

Please see our Authentication guide for more information on authenticating your client. Once authenticated, you'll be ready to start making requests., (*7)

Sample

require 'vendor/autoload.php';

use Google\Cloud\Storage\StorageClient;

$storage = new StorageClient();

$bucket = $storage->bucket('my_bucket');

// Upload a file to the bucket.
$bucket->upload(
    fopen('/data/file.txt', 'r')
);

// Using Predefined ACLs to manage object permissions, you may
// upload a file and give read access to anyone with the URL.
$bucket->upload(
    fopen('/data/file.txt', 'r'),
    [
        'predefinedAcl' => 'publicRead'
    ]
);

// Download and store an object from the bucket locally.
$object = $bucket->object('file_backup.txt');
$object->downloadToFile('/data/file_backup.txt');

Stream Wrapper

require 'vendor/autoload.php';

use Google\Cloud\Storage\StorageClient;

$storage = new StorageClient();
$storage->registerStreamWrapper();

$contents = file_get_contents('gs://my_bucket/file_backup.txt');

Version

This component is considered GA (generally available). As such, it will not introduce backwards-incompatible changes in any minor or patch releases. We will address issues and requests with the highest priority., (*8)

Next Steps

  1. Understand the official documentation.
  2. Take a look at in-depth usage samples.

The Versions

01/02 2018

v1.3.4

1.3.4.0

Cloud Storage Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

23/01 2018

v1.3.3

1.3.3.0

Cloud Storage Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

12/01 2018

v1.3.2

1.3.2.0

Cloud Storage Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

05/01 2018

v1.3.1

1.3.1.0

Cloud Storage Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

16/12 2017

v1.3.0

1.3.0.0

Cloud Storage Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

11/11 2017

v1.2.1

1.2.1.0

Cloud Storage Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

17/10 2017

v1.2.0

1.2.0.0

Cloud Storage Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

18/09 2017

v1.1.5

1.1.5.0

Cloud Storage Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

25/08 2017

v1.1.4

1.1.4.0

Cloud Storage Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

12/07 2017

v1.1.3

1.1.3.0

Cloud Storage Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

12/07 2017

v1.1.2

1.1.2.0

Cloud Storage Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

07/07 2017

v1.1.1

1.1.1.0

Cloud Storage Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

01/07 2017

v1.1.0

1.1.0.0

Cloud Storage Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

31/03 2017

v1.0.0

1.0.0.0

Cloud Storage Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

10/03 2017

v0.1.0

0.1.0.0

Cloud Storage Client for PHP

  Sources   Download

Apache-2.0

The Requires