(No version information available, might only be in Git)
A Map is a sequential collection of key-value pairs, almost identical to an array used in a similar context. Keys can be any type, but must be unique. Values are replaced if added to the map using the same key.
public allocate ( int $capacity ) : void
public apply ( callable $callback ) : void
public capacity ( ) : int
public clear ( ) : void
public copy ( ) : Ds\Map
public diff ( Ds\Map $map ) : Ds\Map
public filter ([ callable $callback ] ) : Ds\Map
public first ( ) : Ds\Pair
public get ( mixed $key [, mixed $default ] ) : mixed
public hasKey ( mixed $key ) : bool
public hasValue ( mixed $value ) : bool
public intersect ( Ds\Map $map ) : Ds\Map
public isEmpty ( ) : bool
public keys ( ) : Ds\Set
public ksort ([ callable $comparator ] ) : void
public ksorted ([ callable $comparator ] ) : Ds\Map
public last ( ) : Ds\Pair
public map ( callable $callback ) : Ds\Map
public merge ( mixed $values ) : Ds\Map
public pairs ( ) : Ds\Sequence
public put ( mixed $key , mixed $value ) : void
public putAll ( mixed $pairs ) : void
public reduce ( callable $callback [, mixed $initial ] ) : mixed
public remove ( mixed $key [, mixed $default ] ) : mixed
public reverse ( ) : void
public reversed ( ) : Ds\Map
public skip ( int $position ) : Ds\Pair
public slice ( int $index [, int $length ] ) : Ds\Map
public sort ([ callable $comparator ] ) : void
public sorted ([ callable $comparator ] ) : Ds\Map
public sum ( ) : int|float
public toArray ( ) : array
public union ( Ds\Map $map ) : Ds\Map
public values ( ) : Ds\Sequence
public xor ( Ds\Map $map ) : Ds\Map}
Ds\Map::MIN_CAPACITY
Version | Description |
---|---|
PECL ds 1.3.0 | The class now implements ArrayAccess. |
© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/class.ds-map.php