定制 marow-dev/redis-connector 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

marow-dev/redis-connector

Composer 安装命令:

composer require marow-dev/redis-connector

包简介

Redis client

关键字:

README 文档

README

Redis client

Connecting to redis

$connection = RedisConnector\Connection();

If connection cant be established RedisConnector\ConnectorException is thrown.

Default connection parameters are:

hostname: localhost

port: 6379

Client

$client = new RedisConnector\Client(new RedisConnector\Connection());

Sending commands to redis

$client = new RedisConnector\Client(new RedisConnector\Connection());
$client->set('key', 'value');

Most popular commands are methods in RedisConnector\Client class (get, set, etc.). You can issue other commands by using RedisConnector\Client object (class RedisConnector\Client implements magic method __call).

Exceptions Codes

  • 10000 - Connection cannot be established
  • 10001 - Not connected to redis
  • 10002 - Response read error
  • 10003 - Error generated by Redis
  • 10004 - Command send error
  • 10100 - No response method
  • 10200 - Data is not an object
  • 10201 - Data is not an array
  • 10202 - Wrong key

Example

try {
  $client = new RedisConnector\Client(new RedisConnector\Connection());
  $client->set('test', 'value of key test');
  $testValue = $client->get('test');
} catch ($e RedisConnector\ConnectorException) {
  var_dump($e);
}

统计信息

  • 总下载量: 16
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-08-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固