Copied!

MapInterface

MapInterface.php : 17

Methods

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

publictoArray()

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

Return values

array<string|int, TValue>