class Illuminate / Redis / Connections / PhpRedisConnection
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

PhpRedisConnection

Extends

Implements

Uses

Properties

protected

$connector callable

The connection creation callback.

Default: null
protected

$config array

The connection configuration array.

Default: null

Methods

public

__construct ( $client , callable $connector , array $config ) : void

Create a new PhpRedis connection.

Parameters

  • $client Redis
  • $connector callable|null
  • $config array
public

get ( $key ) : string|null

Returns the value of the given key.

Parameters

  • $key string
public

mget ( array $keys ) : array

Get the values of all the given keys.

Parameters

  • $keys array
public

set ( $key , $value , $expireResolution , $expireTTL , $flag ) : bool

Set the string value in the argument as the value of the key.

Parameters

  • $key string
  • $value mixed
  • $expireResolution string|null
  • $expireTTL int|null
  • $flag string|null
public

setnx ( $key , $value ) : int

Set the given key if it doesn't exist.

Parameters

  • $key string
  • $value string
public

hmget ( $key , $dictionary ) : array

Get the value of the given hash fields.

Parameters

  • $key string
  • $dictionary mixed
public

hmset ( $key , $dictionary ) : int

Set the given hash fields to their respective values.

Parameters

  • $key string
  • $dictionary mixed
public

hsetnx ( $hash , $key , $value ) : int

Set the given hash field if it doesn't exist.

Parameters

  • $hash string
  • $key string
  • $value string
public

lrem ( $key , $count , $value ) : int|false

Removes the first count occurrences of the value element from the list.

Parameters

  • $key string
  • $count int
  • $value mixed
public

blpop ( $arguments ) : array|null

Removes and returns the first element of the list stored at key.

Parameters

  • $arguments mixed
public

brpop ( $arguments ) : array|null

Removes and returns the last element of the list stored at key.

Parameters

  • $arguments mixed
public

spop ( $key , $count ) : mixed|false

Removes and returns a random element from the set value at key.

Parameters

  • $key string
  • $count int|null
public

zadd ( $key , $dictionary ) : int

Add one or more members to a sorted set or update its score if it already exists.

Parameters

  • $key string
  • $dictionary mixed
public

zrangebyscore ( $key , $min , $max , $options ) : array

Return elements with score between $min and $max.

Parameters

  • $key string
  • $min mixed
  • $max mixed
  • $options array
public

zrevrangebyscore ( $key , $min , $max , $options ) : array

Return elements with score between $min and $max.

Parameters

  • $key string
  • $min mixed
  • $max mixed
  • $options array
public

zinterstore ( $output , $keys , $options ) : int

Find the intersection between sets and store in a new set.

Parameters

  • $output string
  • $keys array
  • $options array
public

zunionstore ( $output , $keys , $options ) : int

Find the union between sets and store in a new set.

Parameters

  • $output string
  • $keys array
  • $options array
public

scan ( $cursor , $options ) : mixed

Scans all keys based on options.

Parameters

  • $cursor mixed
  • $options array
public

zscan ( $key , $cursor , $options ) : mixed

Scans the given set for all values based on options.

Parameters

  • $key string
  • $cursor mixed
  • $options array
public

hscan ( $key , $cursor , $options ) : mixed

Scans the given hash for all values based on options.

Parameters

  • $key string
  • $cursor mixed
  • $options array
public

sscan ( $key , $cursor , $options ) : mixed

Scans the given set for all values based on options.

Parameters

  • $key string
  • $cursor mixed
  • $options array
public

pipeline ( callable $callback ) : Redis|array

Execute commands in a pipeline.

Parameters

  • $callback callable|null
public

transaction ( callable $callback ) : Redis|array

Execute commands in a transaction.

Parameters

  • $callback callable|null
public

evalsha ( $script , $numkeys , $arguments ) : mixed

Evaluate a LUA script serverside, from the SHA1 hash of the script instead of the script itself.

Parameters

  • $script string
  • $numkeys int
  • $arguments mixed
public

eval ( $script , $numberOfKeys , $arguments ) : mixed

Evaluate a script and return its result.

Parameters

  • $script string
  • $numberOfKeys int
  • $arguments mixed
public

subscribe ( $channels , Closure $callback ) : void

Subscribe to a set of given channels for messages.

Parameters

  • $channels array|string
  • $callback Closure
public

psubscribe ( $channels , Closure $callback ) : void

Subscribe to a set of given channels with wildcards.

Parameters

  • $channels array|string
  • $callback Closure
public

createSubscription ( $channels , Closure $callback , $method ) : void

Subscribe to a set of given channels for messages.

Parameters

  • $channels array|string
  • $callback Closure
  • $method string
public

flushdb ( ) : mixed

Flush the selected Redis database.

public

executeRaw ( array $parameters ) : mixed

Execute a raw command.

Parameters

  • $parameters array
public

command ( $method , array $parameters ) : mixed

Run a command against the Redis database.

Parameters

  • $method string
  • $parameters array
public

disconnect ( ) : void

Disconnects from the Redis instance.

public

__call ( $method , $parameters ) : mixed

Pass other method calls down to the underlying client.

Parameters

  • $method string
  • $parameters array