PHP Class PHPDaemon\Clients\Memcache\Pool

Author: Vasily Zorin ([email protected])
Inheritance: extends PHPDaemon\Network\Client
Exibir arquivo Open project: kakserpom/phpdaemon Class Usage Examples

Public Methods

Method Description
add ( string $key, string $value, integer $exp, callable $onResponse = null ) : void Adds the key
append ( string $key, string $value, integer $exp, callable $onResponse = null ) : void Appends a string to the key's value
delete ( string $key, callable $onResponse = null, integer $time ) : void Deletes the key
get ( string $key, callable $onResponse ) : void Gets the key
prepend ( string $key, string $value, integer $exp, callable $onResponse = null ) : void Prepends a string to the key's value
replace ( string $key, string $value, integer $exp, callable $onResponse = null ) : void Replaces the key
set ( string $key, string $value, integer $exp, callable $onResponse = null ) : void Sets the key
stats ( callable $onResponse, string $server = null ) : void Gets a statistics

Protected Methods

Method Description
getConfigDefaults ( ) : array | boolean Setting default config options Overriden from NetworkClient::getConfigDefaults

Method Details

add() public method

Adds the key
public add ( string $key, string $value, integer $exp, callable $onResponse = null ) : void
$key string Key
$value string Value
$exp integer Lifetime in seconds (0 - immortal)
$onResponse callable Callback called when the request complete
return void

append() public method

Appends a string to the key's value
public append ( string $key, string $value, integer $exp, callable $onResponse = null ) : void
$key string Key
$value string Value
$exp integer Lifetime in seconds (0 - immortal)
$onResponse callable Callback called when the request complete
return void

delete() public method

Deletes the key
public delete ( string $key, callable $onResponse = null, integer $time ) : void
$key string Key
$onResponse callable Callback called when the request complete
$time integer Time to block this key
return void

get() public method

Gets the key
public get ( string $key, callable $onResponse ) : void
$key string Key
$onResponse callable Callback called when response received
return void

getConfigDefaults() protected method

Setting default config options Overriden from NetworkClient::getConfigDefaults
protected getConfigDefaults ( ) : array | boolean
return array | boolean

prepend() public method

Prepends a string to the key's value
public prepend ( string $key, string $value, integer $exp, callable $onResponse = null ) : void
$key string Key
$value string Value
$exp integer Lifetime in seconds (0 - immortal)
$onResponse callable Callback called when the request complete
return void

replace() public method

Replaces the key
public replace ( string $key, string $value, integer $exp, callable $onResponse = null ) : void
$key string Key
$value string Value
$exp integer Lifetime in seconds (0 - immortal)
$onResponse callable Callback called when the request complete
return void

set() public method

Sets the key
public set ( string $key, string $value, integer $exp, callable $onResponse = null ) : void
$key string Key
$value string Value
$exp integer Lifetime in seconds (0 - immortal)
$onResponse callable Callback called when the request complete
return void

stats() public method

Gets a statistics
public stats ( callable $onResponse, string $server = null ) : void
$onResponse callable Callback called when the request complete
$server string Server
return void