Skip to content

stevencorona/predis-objects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Edit: Dead Project, Don't use this :)

Similar to Ruby's redis-objects. Let's you seemlessly hook native php data structures into a redis backend.

Super Alpha

Example:

$list = new RList("key");

$list[] = "foo";
$list[] = "bar";
$list[] = "lorem"
$list[] = "ipsum";

// array(foo, bar, lorem, ipsum)

$list["<<"] = "php5"; // array(php5, foo, bar, lorem, ipsum)

count($list); // 5

foreach($list as $data) {
  echo $data;
}

$list->each(2, function($value) {
  echo $value;
});

// php5, foo

$list->pop(); // ipsum
$list->shift(); // php5


// once you cast the list as an array, you can use all of the normal php array
// functions, but data in the array will no longer be pushed/pulled from redis
$data = (array)$list;
array_values($data);

About

Let's you seemlessy hook native php data structures (hashes, arrays, strings) into redis.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages