This is a resource manager for memcached
hasResource()
Check if a resource exists
- param string
- rtype
boolean
getResource()
Gets a memcached resource
- param string
- rtype
MemcachedResource
- throws
ExceptionRuntimeException
setResource()
Set a resource
- param string
- param arrayMemcachedResource
- rtype
MemcachedResourceManager Fluent interface
removeResource()
Remove a resource
- param string
- rtype
MemcachedResourceManager Fluent interface
setPersistentId()
Set the persistent id
- param string
- param string
- rtype
MemcachedResourceManager Fluent interface
- throws
ExceptionRuntimeException
getPersistentId()
Get the persistent id
- param string
- rtype
string
- throws
ExceptionRuntimeException
normalizePersistentId()
Normalize the persistent id
- param string
setLibOptions()
Set Libmemcached options
- param string
- param array
- rtype
MemcachedResourceManager Fluent interface
getLibOptions()
Get Libmemcached options
- param string
- rtype
array
- throws
ExceptionRuntimeException
setLibOption()
Set one Libmemcached option
- param string
- param string|int
- param mixed
- rtype
MemcachedResourceManager Fluent interface
getLibOption()
Get one Libmemcached option
- param string
- param string|int
- rtype
mixed
- throws
ExceptionRuntimeException
normalizeLibOptions()
Normalize libmemcached options
- param array|Traversable
- throws ExceptionInvalidArgumentException
normalizeLibOptionKey()
Convert option name into it's constant value
- param string|int
- throws ExceptionInvalidArgumentException
setServers()
Set servers
$servers can be an array list or a comma separated list of servers. One server in the list can be descripted as follows: - URI: [tcp://]<host>[:<port>][?weight=<weight>] - Assoc: array('host' => <host>[, 'port' => <port>][, 'weight' => <weight>]) - List: array(<host>[, <port>][, <weight>])
- param string
- param string|array
- rtype
MemcachedResourceManager
getServers()
Get servers
- param string
- throws ExceptionRuntimeException
- rtype
array array('host' => <host>, 'port' => <port>, 'weight' => <weight>)
addServers()
Add servers
- param string
- param string|array
- rtype
MemcachedResourceManager
addServer()
Add one server
- param string
- param string|array
- rtype
MemcachedResourceManager
normalizeServers()
Normalize a list of servers into the following format: array(array('host' => <host>, 'port' => <port>, 'weight' => <weight>)[, ...])
- param string|array
normalizeServer()
Normalize one server into the following format: array('host' => <host>, 'port' => <port>, 'weight' => <weight>)
- param string|array
- throws ExceptionInvalidArgumentException
compareServers()
Compare 2 normalized server arrays (Compares only the host and the port)
- param array
- param array
- rtype
int