Skip to content

sjclijie/PHP-Redis-implementation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

PHP Redis implementation V2.1

Simple and lightweight redis implementation, all commands are passed as is, so you have all the freedom to manage redis just like in redis-cli. All "set" type commands can be chained and sent once to the redis server. set_error_function () method allows to set custom error handler.

DOWNLOAD

You can checkout latest version with:

$ git clone git://github.com/ziogas/PHP-Redis-implementation

INSTALL

To install PHP redis:

  • Simply copy redis.php to your site and require it from external script

Here are some examples:

function redis_error ( $error ) { throw new error ( $error ); }

$redis = new redis_cli (); $redis -> set_error_function ( 'redis_error' );

$redis -> cmd ( 'SET', 'foo', 'bar' ) -> cmd ( 'HSET', 'hash', 'field', 'val' ) -> cmd ( 'EXPIRE', 300, 'foo' ) -> set ();

$foo = $redis -> cmd ( 'GET', 'foo' ) -> get (); $field = $redis -> cmd ( 'HGET', 'hash', 'field' ) -> get ();

More usage examples can be found on test.php

LICENSE

MIT

AUTHORS

Arminas Žukauskas

About

Simple redis implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%