2017 © Pedro Peláez
 

library ration

A very simple redis client

image

versionable/ration

A very simple redis client

  • Monday, December 17, 2012
  • by haswalt
  • Repository
  • 0 Watchers
  • 3 Stars
  • 162 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Ration

What is Ration

Ration is a very simple PHP library for interacting with Redis servers., (*1)

Why build another library?

The current PHP libraries are overly complicated for something that should be very quick and simple. There are some great PHP extensions for communicating with Redis, however these need to be compiled and enabled on your machine which isn't always practical. This library is simple, lightweight and portable., (*2)

Requirements

  • PHP 5.3.3+

Installation

We recommend using Composer to add ration to your project. Simply add this to your composer config:, (*3)

{
    "require": {
        "versionable/ration": "1.0.0"
    }
}

Usage

Pinging a remote server, (*4)

    $address = new TCP('10.0.0.1', 6379);
    $connection = new Connection($address);
    $client = new Client($connection);

    $request = new Request(new PingCommand());
    $response = $client->send($request);

Set then get a key, (*5)

    $address = new TCP('10.0.0.1', 6379);
    $connection = new Connection($address);
    $client = new Client($connection);

    $request = new Request(new SetCommand('key', 'value'));
    $client->send($request);

    $request = new Request(new GetCommand('key'));
    $response = $client->send($response);

TODO

  • Complete documentation of current API
  • Implement remaining commands

The Versions

17/12 2012

dev-master

9999999-dev

A very simple redis client

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

reddis

06/08 2012

1.0.0

1.0.0.0

A very simple redis client

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

reddis