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

Public Member Functions

 __construct (StorageInterface $storage, stdClass $marker, array $capabilities=[], Capabilities $baseCapabilities=null)
 Constructor.
 
 getAdapter ()
 Get the storage adapter.
 
 getSupportedDatatypes ()
 Get supported datatypes.
 
 setSupportedDatatypes (stdClass $marker, array $datatypes)
 Set supported datatypes.
 
 getSupportedMetadata ()
 Get supported metadata.
 
 setSupportedMetadata (stdClass $marker, array $metadata)
 Set supported metadata.
 
 getMinTtl ()
 Get minimum supported time-to-live.
 
 setMinTtl (stdClass $marker, $minTtl)
 Set minimum supported time-to-live.
 
 getMaxTtl ()
 Get maximum supported time-to-live.
 
 setMaxTtl (stdClass $marker, $maxTtl)
 Set maximum supported time-to-live.
 
 getStaticTtl ()
 Is the time-to-live handled static (on write) or dynamic (on read)
 
 setStaticTtl (stdClass $marker, $flag)
 Set if the time-to-live handled static (on write) or dynamic (on read)
 
 getTtlPrecision ()
 Get time-to-live precision.
 
 setTtlPrecision (stdClass $marker, $ttlPrecision)
 Set time-to-live precision.
 
 getUseRequestTime ()
 Get use request time.
 
 setUseRequestTime (stdClass $marker, $flag)
 Set use request time.
 
 getExpiredRead ()
 Get if expired items are readable.
 
 setExpiredRead (stdClass $marker, $flag)
 Set if expired items are readable.
 
 getMaxKeyLength ()
 Get maximum key lenth.
 
 setMaxKeyLength (stdClass $marker, $maxKeyLength)
 Set maximum key length.
 
 getNamespaceIsPrefix ()
 Get if namespace support is implemented as prefix.
 
 setNamespaceIsPrefix (stdClass $marker, $flag)
 Set if namespace support is implemented as prefix.
 
 getNamespaceSeparator ()
 Get namespace separator if namespace is implemented as prefix.
 
 setNamespaceSeparator (stdClass $marker, $separator)
 Set the namespace separator if namespace is implemented as prefix.
 

Protected Member Functions

 getCapability ($property, $default=null)
 Get a capability.
 
 setCapability (stdClass $marker, $property, $value)
 Change a capability.
 

Protected Attributes

 $storage
 
 $marker
 
 $baseCapabilities
 
 $expiredRead
 
 $maxKeyLength
 
 $minTtl
 
 $maxTtl
 
 $namespaceIsPrefix
 
 $namespaceSeparator
 
 $staticTtl
 
 $supportedDatatypes
 
 $supportedMetadata
 
 $ttlPrecision
 
 $useRequestTime
 

Constructor & Destructor Documentation

__construct ( StorageInterface  $storage,
stdClass  $marker,
array  $capabilities = [],
Capabilities  $baseCapabilities = null 
)

Constructor.

Parameters
StorageInterface$storage
stdClass$marker
array$capabilities
null | Capabilities$baseCapabilities

Member Function Documentation

getAdapter ( )

Get the storage adapter.

Returns
StorageInterface
getCapability (   $property,
  $default = null 
)
protected

Get a capability.

Parameters
string$property
mixed$default
Returns
mixed
getExpiredRead ( )

Get if expired items are readable.

Returns
bool
getMaxKeyLength ( )

Get maximum key lenth.

Returns
int -1 means unknown, 0 means infinite
getMaxTtl ( )

Get maximum supported time-to-live.

Returns
int 0 means infinite
getMinTtl ( )

Get minimum supported time-to-live.

Returns
int 0 means items never expire
getNamespaceIsPrefix ( )

Get if namespace support is implemented as prefix.

Returns
bool
getNamespaceSeparator ( )

Get namespace separator if namespace is implemented as prefix.

Returns
string
getStaticTtl ( )

Is the time-to-live handled static (on write) or dynamic (on read)

Returns
bool
getSupportedDatatypes ( )

Get supported datatypes.

Returns
array
getSupportedMetadata ( )

Get supported metadata.

Returns
array
getTtlPrecision ( )

Get time-to-live precision.

Returns
float
getUseRequestTime ( )

Get use request time.

Returns
bool
setCapability ( stdClass  $marker,
  $property,
  $value 
)
protected

Change a capability.

Parameters
stdClass$marker
string$property
mixed$value
Returns
Capabilities Fluent interface
Exceptions
Exception\InvalidArgumentException
setExpiredRead ( stdClass  $marker,
  $flag 
)

Set if expired items are readable.

Parameters
stdClass$marker
bool$flag
Returns
Capabilities Fluent interface
setMaxKeyLength ( stdClass  $marker,
  $maxKeyLength 
)

Set maximum key length.

Parameters
stdClass$marker
int$maxKeyLength
Exceptions
Exception\InvalidArgumentException
Returns
Capabilities Fluent interface
setMaxTtl ( stdClass  $marker,
  $maxTtl 
)

Set maximum supported time-to-live.

Parameters
stdClass$marker
int$maxTtl
Exceptions
Exception\InvalidArgumentException
Returns
Capabilities Fluent interface
setMinTtl ( stdClass  $marker,
  $minTtl 
)

Set minimum supported time-to-live.

Parameters
stdClass$marker
int$minTtl
Exceptions
Exception\InvalidArgumentException
Returns
Capabilities Fluent interface
setNamespaceIsPrefix ( stdClass  $marker,
  $flag 
)

Set if namespace support is implemented as prefix.

Parameters
stdClass$marker
bool$flag
Returns
Capabilities Fluent interface
setNamespaceSeparator ( stdClass  $marker,
  $separator 
)

Set the namespace separator if namespace is implemented as prefix.

Parameters
stdClass$marker
string$separator
Returns
Capabilities Fluent interface
setStaticTtl ( stdClass  $marker,
  $flag 
)

Set if the time-to-live handled static (on write) or dynamic (on read)

Parameters
stdClass$marker
bool$flag
Returns
Capabilities Fluent interface
setSupportedDatatypes ( stdClass  $marker,
array  $datatypes 
)

Set supported datatypes.

Parameters
stdClass$marker
array$datatypes
Exceptions
Exception\InvalidArgumentException
Returns
Capabilities Fluent interface
setSupportedMetadata ( stdClass  $marker,
array  $metadata 
)

Set supported metadata.

Parameters
stdClass$marker
string[]$metadata
Exceptions
Exception\InvalidArgumentException
Returns
Capabilities Fluent interface
setTtlPrecision ( stdClass  $marker,
  $ttlPrecision 
)

Set time-to-live precision.

Parameters
stdClass$marker
float$ttlPrecision
Exceptions
Exception\InvalidArgumentException
Returns
Capabilities Fluent interface
setUseRequestTime ( stdClass  $marker,
  $flag 
)

Set use request time.

Parameters
stdClass$marker
bool$flag
Returns
Capabilities Fluent interface

Member Data Documentation

$baseCapabilities
protected
$expiredRead
protected
$marker
protected
$maxKeyLength
protected
$maxTtl
protected
$minTtl
protected
$namespaceIsPrefix
protected
$namespaceSeparator
protected
$staticTtl
protected
$storage
protected
$supportedDatatypes
protected
$supportedMetadata
protected
$ttlPrecision
protected
$useRequestTime
protected