sandeepshetty / redis_protocol
Simple PHP client library for the Redis protocol (http://redis.io/topics/protocol)
Installs: 18
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 1
Forks: 4
pkg:composer/sandeepshetty/redis_protocol
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-10-11 18:48:33 UTC
README
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.