PHP Class Webmozart\KeyValueStore\ArrayStore

The contents of the store are lost when the store is released from memory.
Since: 1.0
Author: Bernhard Schussek ([email protected])
Inheritance: implements Webmozart\KeyValueStore\Api\SortableStore, implements Webmozart\KeyValueStore\Api\CountableStore
Mostra file Open project: webmozart/key-value-store

Public Methods

Method Description
__construct ( array $array = [], $flags ) Creates a new store.
clear ( )
count ( )
exists ( $key )
get ( $key, $default = null )
getMultiple ( array $keys, $default = null )
getMultipleOrFail ( array $keys )
getOrFail ( $key )
keys ( )
remove ( $key )
set ( $key, $value )
sort ( $flags = SORT_REGULAR )
toArray ( ) : array Returns the contents of the store as array.

Method Details

__construct() public method

Creates a new store.
public __construct ( array $array = [], $flags )
$array array The values to set initially in the store.

clear() public method

public clear ( )

count() public method

public count ( )

exists() public method

public exists ( $key )

get() public method

public get ( $key, $default = null )

getMultiple() public method

public getMultiple ( array $keys, $default = null )
$keys array

getMultipleOrFail() public method

public getMultipleOrFail ( array $keys )
$keys array

getOrFail() public method

public getOrFail ( $key )

keys() public method

public keys ( )

remove() public method

public remove ( $key )

set() public method

public set ( $key, $value )

sort() public method

public sort ( $flags = SORT_REGULAR )

toArray() public method

Returns the contents of the store as array.
public toArray ( ) : array
return array The keys and values in the store.