regeda/nest
Composer 安装命令:
composer require regeda/nest
包简介
Nest is a decorator for key based methods invocation
README 文档
README
Nest is a decorator for key based methods invocation. The class for PHP 5.3 consists of just one file.
Usage
Defining the initial namespace and the client:
$nest = new Nest('foo', new Redis()); echo $nest; // -> foo
Extending the namespace:
$nest = new Nest('foo', new Redis()); echo $nest['bar']; // -> foo:bar echo $nest['bar']['baz']; // -> foo:bar:baz
Invoking a method:
$redis = new Redis(); // or $memcached = new Memcached() $user = new Nest('user', $redis); // getter foreach ($ids as $id) { echo $user[$id]['username']->get(); // makes the proxy to $redis->get('user:$id:username') } // setter $user[$id]['age']->set(18); // $redis->set('user:$id:age', 18)
统计信息
- 总下载量: 25
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-04-18