PHP Class PHPDaemon\Clients\Redis\Connection

Author: Vasily Zorin ([email protected])
Inheritance: extends PHPDaemon\Network\ClientConnection, implements Iterator
Exibir arquivo Open project: kakserpom/phpdaemon

Public Properties

Property Type Description
$channel Channel name
$error Current error message
$msg Message
$psubscribeCb
$result Current result
$subscribeCb Subcriptions

Protected Properties

Property Type Description
$EOL string
$args Current arguments
$argsStack Stack of commands arguments
$assocData Associative result storage
$key Current incoming key
$levelLength Current level length
$pos Iterator position
$ptr
$resultType Current result type
$resultTypeStack Stack of results types
$stack
$subscribed Is it a subscription connection?
$timeoutRead Timeout
$valueLength Current value length

Public Methods

Method Description
__call ( sting $cmd, array $args ) : void Magic __call Example: $redis->lpush('mylist', microtime(true));
__construct ( $fd, $pool = null )
__get ( string $name ) : array Get associative result
arrayToHash ( array $array ) : array Converts array into hash
autoscan ( string $cmd, array $args = [], cllable $cbEnd = null, integer $limit = null ) : AutoScan Wrapper for scans commands
command ( string $name, array $args, callable $cb = null ) : void
current ( )
getLocalSubscribersCount ( string $chan ) : integer
key ( )
lock ( string $key, integer $timeout ) : Lock
meval ( callable $cb = null ) : MultiEval Easy wrapper for queue of eval's
next ( )
onFinish ( ) : void Called when connection finishes
onReady ( ) : void Called when the connection is handshaked (at low-level), and peer is ready to recv. data
pushValue ( mixed $val ) : void
rewind ( )
sendCommand ( string $name, array $args, callable $cb = null ) : void
valid ( )

Protected Methods

Method Description
onPacket ( )
onRead ( ) : void Called when new data received

Method Details

__call() public method

Magic __call Example: $redis->lpush('mylist', microtime(true));
public __call ( sting $cmd, array $args ) : void
$cmd sting
$args array
return void

__construct() public method

public __construct ( $fd, $pool = null )

__get() public method

Get associative result
public __get ( string $name ) : array
$name string
return array

arrayToHash() public method

Converts array into hash
public arrayToHash ( array $array ) : array
$array array
return array $hash

autoscan() public method

Wrapper for scans commands
public autoscan ( string $cmd, array $args = [], cllable $cbEnd = null, integer $limit = null ) : AutoScan
$cmd string Command
$args array Arguments
$cbEnd cllable Callback
$limit integer Limit
return AutoScan

command() public method

public command ( string $name, array $args, callable $cb = null ) : void
$name string
$args array
$cb callable
return void

current() public method

public current ( )

getLocalSubscribersCount() public method

public getLocalSubscribersCount ( string $chan ) : integer
$chan string
return integer

key() public method

public key ( )

lock() public method

public lock ( string $key, integer $timeout ) : Lock
$key string
$timeout integer
return Lock

meval() public method

Easy wrapper for queue of eval's
public meval ( callable $cb = null ) : MultiEval
$cb callable
return MultiEval

next() public method

public next ( )

onFinish() public method

Called when connection finishes
public onFinish ( ) : void
return void

onPacket() protected method

protected onPacket ( )

onRead() protected method

Called when new data received
protected onRead ( ) : void
return void

onReady() public method

Called when the connection is handshaked (at low-level), and peer is ready to recv. data
public onReady ( ) : void
return void

pushValue() public method

public pushValue ( mixed $val ) : void
$val mixed
return void

rewind() public method

public rewind ( )

sendCommand() public method

public sendCommand ( string $name, array $args, callable $cb = null ) : void
$name string
$args array
$cb callable
return void

valid() public method

public valid ( )

Property Details

$EOL protected_oe property

protected string $EOL
return string

$args protected_oe property

Current arguments
protected $args

$argsStack protected_oe property

Stack of commands arguments
protected $argsStack

$assocData protected_oe property

Associative result storage
protected $assocData

$channel public_oe property

Channel name
public $channel

$error public_oe property

Current error message
public $error

$key protected_oe property

Current incoming key
protected $key

$levelLength protected_oe property

Current level length
protected $levelLength

$msg public_oe property

Message
public $msg

$pos protected_oe property

Iterator position
protected $pos

$psubscribeCb public_oe property

public $psubscribeCb

$ptr protected_oe property

protected $ptr

$result public_oe property

Current result
public $result

$resultType protected_oe property

Current result type
protected $resultType

$resultTypeStack protected_oe property

Stack of results types
protected $resultTypeStack

$stack protected_oe property

protected $stack

$subscribeCb public_oe property

Subcriptions
public $subscribeCb

$subscribed protected_oe property

Is it a subscription connection?
protected $subscribed

$timeoutRead protected_oe property

Timeout
protected $timeoutRead

$valueLength protected_oe property

Current value length
protected $valueLength