Copied!

MutableMapInterface

MutableMapInterface.php : 17
Extends MapInterface

Methods

publicclear()

MutableMapInterface.php : 30
public clear() : void

publicget()

MapInterface.php : 28

Returns value associated with given key.

public get(TKey $key) : TValue

Parameters

Name Type Default value Description
$key TKey - -

Return values

TValue

Tags
Throws
OutOfBoundsException

if map does not contain element with given key

publicgetIterator()

CollectionInterface.php : 32
public getIterator() : Iterator

Return values

Iterator

publichas()

MapInterface.php : 35

Returns true if the given key is defined within the map.

public has(TKey $key) : bool

Parameters

Name Type Default value Description
$key TKey - -

Return values

bool

publicisEmpty()

CollectionInterface.php : 22
public isEmpty() : bool

Return values

bool

publicset()

MutableMapInterface.php : 23
public set(TKey $key, TValue $value) : void

Parameters

Name Type Default value Description
$key TKey - -
$value TValue - -

publictoArray()

CollectionInterface.php : 27
public toArray() : array<string|int, TValue>

Return values

array<string|int, TValue>

publicunset()

MutableMapInterface.php : 28
public unset(TKey $key) : void

Parameters

Name Type Default value Description
$key TKey - -