Skip to content

notmaintained/redis_protocol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

redis_protocol

Simple PHP client library for the Redis protocol.

Requirements

  • PHP 5.3+

Getting Started

Download via Composer

Create a composer.json file if you don't already have one in your projects root directory and require redis_protocol:

{
	"require": {
		"sandeepshetty/redis_protocol": "dev-master"
	}
}

Install Composer:

$ curl -s http://getcomposer.org/installer | php

Run the install command:

$ php composer.phar install

This will download redis_protocol into the vendor/sandeepshetty/redis_protocol directory.

To learn more about Composer visit http://getcomposer.org/

Description

callable redis_protocol\client( [string $host = '127.0.0.1' [, int $port = 6379]] )

The returned function accepts a Redis command as a string.

Usage

<?php

	require 'vendor/sandeepshetty/redis_protocol/client.php';
	use sandeepshetty\redis_protocol;


	$redis = redis_protocol\client();

	var_dump($redis('SET foo "bar baz"')); // bool(true)
	var_dump($redis('GET foo'));           // string(7) "bar baz"

	$redis('QUIT');


?>

TODO

Support for Pipelining and Clustering.

About

Simple PHP client library for the Redis protocol (http://redis.io/topics/protocol)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages