2017 © Pedro Peláez
 

library redis-connector

Redis client

image

marow-dev/redis-connector

Redis client

  • Friday, September 16, 2016
  • by marow-dev
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

php-redis-connector

Redis client, (*1)

Connecting to redis

$connection = RedisConnector\Connection();

If connection cant be established RedisConnector\ConnectorException is thrown., (*2)

Default connection parameters are:, (*3)

hostname: localhost, (*4)

port: 6379, (*5)

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)., (*6)

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);
}

The Versions

16/09 2016

dev-master

9999999-dev https://github.com/marow-dev/php-redis-connector

Redis client

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Marcin Owczarczyk

redis

11/08 2016

0.2.0

0.2.0.0 https://github.com/marow-dev/php-redis-connector

Redis client

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

redis