Property | Type | Description | |
---|---|---|---|
$authPassword | string | ||
$closeOnDestruct | boolean | ||
$commandNames | array | ||
$commands | string | ||
$connectFailures | integer | ||
$connected | boolean | ||
$host | string | Host of the Redis server | |
$isMulti | boolean | ||
$isWatching | boolean | ||
$maxConnectRetries | integer | ||
$persistent | string | Unique identifier for persistent connections | |
$port | integer | Port on which the Redis server is running | |
$readTimeout | float | Timeout for reading response from Redis server | |
$redis | resource | Redis | Socket connection to the Redis server or Redis library instance | |
$redisMulti | |||
$renamedCommands | array | ||
$requests | integer | ||
$selectedDb | integer | ||
$standalone | boolean | ||
$subscribed | boolean | ||
$timeout | float | Timeout for connecting to Redis server | |
$usePipeline | boolean | ||
$wrapperMethods | array | Aliases for backwards compatibility with phpredis |
Method | Description | |
---|---|---|
__call ( $name, $args ) | ||
__construct ( string $host = '127.0.0.1', integer $port = 6379, float $timeout = null, string $persistent = '', integer $db, string $password = null ) | Creates a Redisent connection to the Redis server on host {@link $host} and port {@link $port}. | |
__destruct ( ) | ||
auth ( string $password ) : boolean | ||
close ( ) : boolean | ||
connect ( ) : Credis_Client | ||
forceStandalone ( ) : Credis_Client | ||
getHost ( ) : string | Return the host of the Redis instance | |
getPersistence ( ) : string | ||
getPort ( ) : integer | Return the port of the Redis instance | |
getRenamedCommand ( $command ) | ||
getSelectedDb ( ) : integer | Return the selected database | |
hscan ( integer &$Iterator, string $field, string $pattern = null, integer $count = null ) : boolean | Array | ||
isConnected ( ) : boolean | ||
isSubscribed ( ) : boolean | ||
pSubscribe ( string | array $patterns, $callback ) | ||
pUnsubscribe ( ) : array | ||
renameCommand ( string | callable | array $command, string | null $alias = NULL ) | Enabled command renaming and provide mapping method. Supported methods are: | |
scan ( integer &$Iterator, string $pattern = null, $count = null ) : boolean | Array | ||
select ( integer $index ) : boolean | ||
setCloseOnDestruct ( boolean $flag ) : Credis_Client | ||
setMaxConnectRetries ( integer $retries ) : Credis_Client | ||
setReadTimeout ( integer $timeout ) : Credis_Client | Set the read timeout for the connection. Use 0 to disable timeouts entirely (or use a very long timeout if not supported). | |
sscan ( integer &$Iterator, string $field, string $pattern = null, $count = null ) : boolean | Array | ||
subscribe ( string | array $channels, $callback ) | ||
unsubscribe ( ) : array | ||
zscan ( integer &$Iterator, string $field, string $pattern = null, $count = null ) : boolean | Array |
Method | Description | |
---|---|---|
convertHost ( ) | ||
read_reply ( $name = '' ) | ||
write_command ( $command ) |
Method | Description | |
---|---|---|
_flattenArguments ( array $arguments, &$out = [] ) : array | Flatten arguments | |
_map ( $arg ) | ||
_prepare_command ( array $args ) : string | Build the Redis unified protocol command |
public __construct ( string $host = '127.0.0.1', integer $port = 6379, float $timeout = null, string $persistent = '', integer $db, string $password = null ) | ||
$host | string | The hostname of the Redis server |
$port | integer | The port number of the Redis server |
$timeout | float | Timeout period in seconds |
$persistent | string | Flag to establish persistent connection |
$db | integer | The selected datbase of the Redis server |
$password | string | The authentication password of the Redis server |
public getSelectedDb ( ) : integer | ||
return | integer |
public pSubscribe ( string | array $patterns, $callback ) | ||
$patterns | string | array | |
$callback |
public setCloseOnDestruct ( boolean $flag ) : Credis_Client | ||
$flag | boolean | |
return | Credis_Client |
public setMaxConnectRetries ( integer $retries ) : Credis_Client | ||
$retries | integer | |
return | Credis_Client |
public setReadTimeout ( integer $timeout ) : Credis_Client | ||
$timeout | integer | 0 (or -1) for no timeout, otherwise number of seconds |
return | Credis_Client |
protected string $persistent | ||
return | string |
protected int $port | ||
return | integer |
protected float $readTimeout | ||
return | float |
protected resource|Redis $redis | ||
return | resource | Redis |
protected float $timeout | ||
return | float |
protected array $wrapperMethods | ||
return | array |