Zend Framework  3.0
Public Member Functions | Protected Attributes | List of all members
MemcachedOptions Class Reference

These are options specific to the Memcached adapter. More...

Public Member Functions

 setNamespace ($namespace)
 Set namespace.
 
 setNamespaceSeparator ($namespaceSeparator)
 Set namespace separator.
 
 getNamespaceSeparator ()
 Get namespace separator.
 
 setMemcachedResource (MemcachedResource $memcachedResource=null)
 A memcached resource to share.
 
 getMemcachedResource ()
 Get memcached resource to share.
 
 setResourceManager (MemcachedResourceManager $resourceManager=null)
 Set the memcached resource manager to use.
 
 getResourceManager ()
 Get the memcached resource manager.
 
 getResourceId ()
 Get the memcached resource id.
 
 setResourceId ($resourceId)
 Set the memcached resource id.
 
 getPersistentId ()
 Get the persistent id.
 
 setPersistentId ($persistentId)
 Set the persistent id.
 
 addServer ($host, $port=11211, $weight=0)
 Add a server to the list.
 
 setServers ($servers)
 Set a list of memcached servers to add on initialize.
 
 getServers ()
 Get Servers.
 
 setLibOptions (array $libOptions)
 Set libmemcached options.
 
 setLibOption ($key, $value)
 Set libmemcached option.
 
 getLibOptions ()
 Get libmemcached options.
 
 getLibOption ($key)
 Get libmemcached option.
 
- Public Member Functions inherited from AdapterOptions
 setAdapter (StorageInterface $adapter=null)
 Adapter using this instance.
 
 setKeyPattern ($keyPattern)
 Set key pattern.
 
 getKeyPattern ()
 Get key pattern.
 
 setNamespace ($namespace)
 Set namespace.
 
 getNamespace ()
 Get namespace.
 
 setReadable ($readable)
 Enable/Disable reading data from cache.
 
 getReadable ()
 If reading data from cache enabled.
 
 setTtl ($ttl)
 Set time to live.
 
 getTtl ()
 Get time to live.
 
 setWritable ($writable)
 Enable/Disable writing data to cache.
 
 getWritable ()
 If writing data to cache enabled.
 
 toArray ()
 Cast to array.
 
 setFromArray ($options)
 {}
 
- Public Member Functions inherited from AbstractOptions
 __construct ($options=null)
 Constructor.
 
 setFromArray ($options)
 Set one or more configuration properties.
 
 toArray ()
 Cast to array.
 
 __set ($key, $value)
 Set a configuration property.
 
 __get ($key)
 Get a configuration property.
 
 __isset ($key)
 Test if a configuration property is null.
 
 __unset ($key)
 Set a configuration property to NULL.
 

Protected Attributes

 $__prioritizedProperties__ = ['resource_manager', 'resource_id']
 
 $namespaceSeparator = ':'
 
 $resourceManager
 
 $resourceId = 'default'
 
- Protected Attributes inherited from AdapterOptions
 $__prioritizedProperties__ = []
 
 $adapter
 
 $keyPattern = ''
 
 $namespace = 'zfcache'
 
 $readable = true
 
 $ttl = 0
 
 $writable = true
 
- Protected Attributes inherited from AbstractOptions
 $__strictMode__ = true
 

Additional Inherited Members

- Protected Member Functions inherited from AdapterOptions
 triggerOptionEvent ($optionName, $optionValue)
 Triggers an option event if this options instance has a connection to an adapter implements EventsCapableInterface.
 
 normalizeTtl (&$ttl)
 Validates and normalize a TTL.
 

Detailed Description

These are options specific to the Memcached adapter.

Member Function Documentation

addServer (   $host,
  $port = 11211,
  $weight = 0 
)

Add a server to the list.

Parameters
string$host
int$port
int$weight
Returns
MemcachedOptions
Deprecated:
Please use the resource manager instead
getLibOption (   $key)

Get libmemcached option.

Parameters
string | int$key
Returns
mixed deprecated 7.
getLibOptions ( )

Get libmemcached options.

Returns
array http://php.net/manual/memcached.constants.php
getMemcachedResource ( )

Get memcached resource to share.

Returns
MemcachedResource
Deprecated:
Please use the resource manager instead
getNamespaceSeparator ( )

Get namespace separator.

Returns
string
getPersistentId ( )

Get the persistent id.

Returns
string
getResourceId ( )

Get the memcached resource id.

Returns
string
getResourceManager ( )

Get the memcached resource manager.

Returns
MemcachedResourceManager
getServers ( )

Get Servers.

Returns
array
setLibOption (   $key,
  $value 
)

Set libmemcached option.

Parameters
string | int$key
mixed$value
Returns
MemcachedOptions deprecated 6.
setLibOptions ( array  $libOptions)

Set libmemcached options.

Parameters
array$libOptions
Returns
MemcachedOptions http://php.net/manual/memcached.constants.php
setMemcachedResource ( MemcachedResource  $memcachedResource = null)

A memcached resource to share.

Parameters
null | MemcachedResource$memcachedResource
Returns
MemcachedOptions
Deprecated:
Please use the resource manager instead
setNamespace (   $namespace)

Set namespace.

The option Memcached::OPT_PREFIX_KEY will be used as the namespace. It can't be longer than 128 characters.

See Also
AdapterOptions::setNamespace()
MemcachedOptions::setPrefixKey()
setNamespaceSeparator (   $namespaceSeparator)

Set namespace separator.

Parameters
string$namespaceSeparator
Returns
MemcachedOptions
setPersistentId (   $persistentId)

Set the persistent id.

Parameters
string$persistentId
Returns
MemcachedOptions
setResourceId (   $resourceId)

Set the memcached resource id.

Parameters
string$resourceId
Returns
MemcachedOptions
setResourceManager ( MemcachedResourceManager  $resourceManager = null)

Set the memcached resource manager to use.

Parameters
null | MemcachedResourceManager$resourceManager
Returns
MemcachedOptions
setServers (   $servers)

Set a list of memcached servers to add on initialize.

Parameters
string | array$serverslist of servers
Returns
MemcachedOptions
Exceptions
Exception\InvalidArgumentException

Member Data Documentation

$__prioritizedProperties__ = ['resource_manager', 'resource_id']
protected
$namespaceSeparator = ':'
protected
$resourceId = 'default'
protected
$resourceManager
protected