PHP Interface Pantheon\Terminus\DataStore\DataStoreInterface

Show file Open project: pantheon-systems/terminus Interface Usage Examples

Public Methods

Method Description
get ( string $key ) : mixed Reads retrieves data from the store
has ( string $key ) : boolean Checks if a key is in the store
keys ( ) : array Return a list of all keys in the store.
remove ( string $key ) Remove value from the store
set ( string $key, mixed $data ) Saves a value with the given key

Method Details

get() public method

Reads retrieves data from the store
public get ( string $key ) : mixed
$key string A key
return mixed The value fpr the given key or null.

has() public method

Checks if a key is in the store
public has ( string $key ) : boolean
$key string A key
return boolean Whether a value exists with the given key

keys() public method

Return a list of all keys in the store.
public keys ( ) : array
return array A list of keys

remove() public method

Remove value from the store
public remove ( string $key )
$key string A key

set() public method

Saves a value with the given key
public set ( string $key, mixed $data )
$key string A key
$data mixed Data to save to the store