Download the PHP package rkr/key-value-stores without Composer

On this page you can find all versions of the php package rkr/key-value-stores. 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 key-value-stores

php-key-value-stores

Travis

This project aims to provide a standard interface to common key-value-stores like memcache, redis or similar. If an author of a specific driver develops against these interfaces, is can be used everywhere the interfaces are implemented. This project does not ship a concrete implementations to existing stores.

Common interfaces

Stores

The simple version of the key value stores provide methods to set, get and remove a entry. There is also a method to test if a entry is existing:

The ReadWriteStore-Interface has no own methods. It extends the 2 Interfaces ReadableStore and WritableStore which in turn extend from other, more basic interfaces. The idea behind this is described here.

Behavior of stores

has() returns true when a key exists in the store and false if not. In addition to that, it throws an exception when $key is not a valid type (see valid types).

get() returns the content of a entry, referenced by $key. If the entry was not found, get() then returns $default. $default must be a value value-type. In addition to that, an InvalidArgumentException or deriving gets thrown when $key is not a valid key-type (see valid types) and an InvalidOperationException or deriving gets thrown for store specific reasons.

set() sets the value of an entry. If the corresponding entry does not exist, set will create it. If the entry already exists, set will overwrite its content. set() returns $this for a fluent interface. In addition to that, an InvalidArgumentException or deriving gets thrown when $key is not a valid key-type (see valid types) and an InvalidOperationException or deriving gets thrown for store specific reasons.

remove() removes an entry from a store. It throws an InvalidOperationException or deriving if this operation fails, caused by a missing entry or another process failure. In addition to that, an InvalidArgumentException or deriving gets thrown when $key is not a valid key-type (see valid types).

Contexts

A context is similar to a table in a RDBMS. With contexts, you can separate stores for different environments or components. So a context is like a central singleton-repository for stores.

For example, a context could be used to define a database connection. Every store created by that context inherit that connection and possibly some metadata too.

Valid types

Valid key-type

A key is valid if it is a string, int or object with a __toString() method. The store must not serialize and/or hash a key to convert any object to a string.

Valid value-type

A value (or default-value) is valid under the same criterias as a key-type. A default-value is also allowed to be null.

Standard-tests

A store-author can make use of the provided standardtests to ensure compilance. So far, there are only tests for the ReadWriteStore and the Contexts. The tests are based in phpunit 3.7.

Installation via composer

composer require "rkr/php-key-value-stores" "~v0.0"


All versions of key-value-stores with dependencies

PHP Build Version
Package Version
Requires php Version >= 5.3
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 rkr/key-value-stores contains the following files

Loading the files please wait ....