2017 © Pedro Peláez
 

library php-google-cloud-storage

A simple PHP class to perform basic actions on Google Cloud Storage files

image

wronx/php-google-cloud-storage

A simple PHP class to perform basic actions on Google Cloud Storage files

  • Wednesday, January 25, 2017
  • by WRonX
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

PHP Google Cloud Storage

This piece of poorly written code may help you with performing basic operations on Google Cloud Storage files. Or may not. I don't know, I'm a plumber, not a fortune-teller., (*1)

License:

Copyright © 2016 github.com/WRonX
This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See http://www.wtfpl.net/ for more details., (*2)

Features:

  • downloading file from bucket
  • uploading file to bucket
  • check if file exists in bucket under specified location
  • delete file from bucket
  • ...
  • PROFIT

Installation and configuration:

php composer.phar require wronx/php-google-cloud-storage "dev-master", (*3)

Usage

Method names should be self-explanatory, so just a few words about the rest:, (*4)

Caching Storage Objects

You can safely use it if you are sure nothing comes in your way.
Say you are checking if file exists (that loads Storage Object to cache), then you want to download it. But meanwhile someone deleted it. If you want to avoid such situations (if there's a possibility it can happen), disable caching., (*5)

Authorization file

This one should be downloadable from GCloud. It looks like this:, (*6)

{
  "type": "service_account",
  "project_id": "your-project-id",
  "private_key_id": "your private key ID",
  "private_key": "-----BEGIN PRIVATE KEY-----\n Your private key goes here \n-----END PRIVATE KEY-----\n",
  "client_email": "something@probably-your-project-id.iam.gserviceaccount.com",
  "client_id": "clientID",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://accounts.google.com/o/oauth2/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/something@probably-your-project-id.iam.gserviceaccount.com"
}

Summary

Oh, come on, I spent enough time writing readme already..., (*7)

The Versions

25/01 2017

dev-master

9999999-dev https://github.com/WRonX/PHPGoogleCloudStorage

A simple PHP class to perform basic actions on Google Cloud Storage files

  Sources   Download

WTFPL

The Requires

 

The Development Requires

php cloud google storage

25/01 2017

v0.91-RC1

0.91.0.0-RC1 https://github.com/WRonX/PHPGoogleCloudStorage

A simple PHP class to perform basic actions on Google Cloud Storage files

  Sources   Download

WTFPL

The Requires

 

The Development Requires

php cloud google storage

28/11 2016

v0.9-RC

0.9.0.0-RC https://github.com/WRonX/PHPGoogleCloudStorage

A simple PHP class to perform basic actions on Google Cloud Storage files

  Sources   Download

WTFPL

The Requires

 

The Development Requires

php cloud google storage