Download the PHP package namshi/gvalue without Composer

On this page you can find all versions of the php package namshi/gvalue. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package gvalue

Gvalue: convert Google Docs to a key-value array

Build Status

The aim of this library is to be able to parse a Google Spreadsheet as a simple key-value, so that you can use it to configure your applications.

Isn't this twisted?

With great power comes great responsibility.

We want to be able to change the configuration of our apps in the easiest way, so we thought we should have an easily accessible key-value storage where we would put those config values that will be used by the apps: for example, products per page, cache lifetime, and so on and so forth. We eventually figured out that Redis would be a very good candidate for storing our configuration.

The problem comes when you think of how you would update that configuration values:

Even though this might sound simple to you should consider that it might be a slow and repetitive task and that you need to be a developer / sysadmin for doing it.

This means that if your PM wants to change the cache lifetime of your homepage, the number of articles you can show per page, he has to ask you. Call you. Wake you up in the night. Follow you. Stalk you.

You're doomed.

Or are you? By storing your config into a google doc you can simply give access to it to anyone who's responsible enough to understand what products per page: 30 means! They can update the doc, invoke a URL which will use this library to convert it to a key-value array and store it in redis and you can happily delegate tasks and require no more deployments for a change in your configuration!

Usage

Create a Google Spreadsheet organized in two columns: the first one will represent the configuration keys while the second one the values:

a simple google doc

At this point you will have to publish the Google Doc to the web so that it will become available at a (sort of) public URL:

publish google doc

Then you simply have to run the following code and get the key-value configuration out of your google doc:

In order to get the document key simply look at the URL of the spreadsheet, which will be something similar to https://docs.google.com/spreadsheet/ccc?key=0Au4X4OwTcvrSdG5oZkFXMXM5SUl4YVF5bDV2NmZiSmc#gid=0: the key for this document would be 0Au4X4OwTcvrSdG5oZkFXMXM5SUl4YVF5bDV2NmZiSmc.

Security

If you are concerned about the security implications of this technique consider the following:

Updating configuration values

Every time a config value is updated you should republish the doc so that changes are immediately available.

Tests

This library is tested with PHPUnit, just run phpunit from the root of the repo.


All versions of gvalue with dependencies

PHP Build Version
Package Version
Requires guzzle/guzzle Version ~3.7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package namshi/gvalue contains the following files

Loading the files please wait ....