Overview

Namespaces

  • Webmozart
    • KeyValueStore
      • Api
      • Decorator
      • Util

Classes

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

Class SortableDecorator

A sortable decorator implementing a sort system for any store.

Webmozart\KeyValueStore\Decorator\AbstractDecorator implements Webmozart\KeyValueStore\Api\KeyValueStore
Extended by Webmozart\KeyValueStore\Decorator\SortableDecorator implements Webmozart\KeyValueStore\Api\SortableStore
Namespace: Webmozart\KeyValueStore\Decorator
Since: 1.0
Author: Bernhard Schussek bschussek@gmail.com
Author: Titouan Galopin galopintitouan@gmail.com
Located at Decorator/SortableDecorator.php
Methods summary
public
# sort( integer $flags = SORT_REGULAR )

Sort the store by its keys.

Sort the store by its keys.

Parameters

$flags
Sorting type flags (from the standard PHP sort flags).

Throws

ReadException
If the store cannot be read.
WriteException
If the store cannot be written.

Implementation of

Webmozart\KeyValueStore\Api\SortableStore::sort()
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 array
# keys( )

Returns all keys currently stored in the store.

Returns all keys currently stored in the store.

Returns

array

The keys stored in the store. Each key is either a string or an integer. The order of the keys is undefined.

Throws

ReadException
If the store cannot be read.

Overrides

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

Implementation of

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