StateInterface
interface StateInterface (View source)
Defines the interface for the state system.
Methods
mixed
get(string $key, mixed $default = NULL)
Returns the stored value for a given key.
array
getMultiple(array $keys)
Returns the stored key/value pairs for a given set of keys.
set(string $key, mixed $value)
Saves a value for a given key.
setMultiple(array $data)
Saves key/value pairs.
delete(string $key)
Deletes an item.
deleteMultiple(array $keys)
Deletes multiple items.
resetCache()
Resets the static cache.
Details
mixed
get(string $key, mixed $default = NULL)
Returns the stored value for a given key.
array
getMultiple(array $keys)
Returns the stored key/value pairs for a given set of keys.
set(string $key, mixed $value)
Saves a value for a given key.
setMultiple(array $data)
Saves key/value pairs.
delete(string $key)
Deletes an item.
deleteMultiple(array $keys)
Deletes multiple items.
resetCache()
Resets the static cache.
This is mainly used in testing environments.