Overview

Namespaces

  • Webmozart
    • KeyValueStore
      • Api
      • Decorator
      • Util

Classes

  • AbstractDecorator
  • CachingDecorator
  • CountableDecorator
  • SortableDecorator
  • Overview
  • Namespace
  • Class

Class CountableDecorator

A countable decorator implementing a count system for any store.

Webmozart\KeyValueStore\Decorator\AbstractDecorator implements Webmozart\KeyValueStore\Api\KeyValueStore
Extended by Webmozart\KeyValueStore\Decorator\CountableDecorator implements Webmozart\KeyValueStore\Api\CountableStore
Namespace: Webmozart\KeyValueStore\Decorator
Since: 1.0
Author: Bernhard Schussek bschussek@gmail.com
Author: Titouan Galopin galopintitouan@gmail.com
Located at Decorator/CountableDecorator.php
Methods summary
public
# set( integer|string $key, mixed $value )

Sets the value for a key in the store.

Sets the value for a key in the store.

Parameters

$key
The key to set.
$value
The value to set for the key.

Throws

WriteException
If the store cannot be written.
InvalidKeyException
If the key is not a string or integer.
SerializationFailedException
If the value cannot be serialized.
UnsupportedValueException

If the value is not supported by the implementation.

Overrides

Webmozart\KeyValueStore\Decorator\AbstractDecorator::set()

Implementation of

Webmozart\KeyValueStore\Api\KeyValueStore::set()
public boolean
# remove( integer|string $key )

Removes a key from the store.

Removes a key from the store.

Parameters

$key
The key to remove.

Returns

boolean
Returns true if a key was removed from the store.

Throws

WriteException
If the store cannot be written.
InvalidKeyException
If the key is not a string or integer.

Overrides

Webmozart\KeyValueStore\Decorator\AbstractDecorator::remove()

Implementation of

Webmozart\KeyValueStore\Api\KeyValueStore::remove()
public
# clear( )

Removes all keys from the store.

Removes all keys from the store.

Throws

WriteException
If the store cannot be written.

Overrides

Webmozart\KeyValueStore\Decorator\AbstractDecorator::clear()

Implementation of

Webmozart\KeyValueStore\Api\KeyValueStore::clear()
public
# count( )

Count the number of keys in the store.

Count the number of keys in the store.

Throws

ReadException
If the store cannot be read.

Implementation of

Webmozart\KeyValueStore\Api\CountableStore::count()
Methods inherited from Webmozart\KeyValueStore\Decorator\AbstractDecorator
__construct(), exists(), get(), getMultiple(), getMultipleOrFail(), getOrFail(), keys()
Properties inherited from Webmozart\KeyValueStore\Decorator\AbstractDecorator
$store
Webmozart Key-Value Store API API documentation generated by ApiGen