Download the PHP package lamansky/map without Composer
On this page you can find all versions of the php package lamansky/map. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Vendor lamansky
Package map
Short Description An iterable key-value collection class.
License MIT
Homepage https://github.com/lamansky/map
Package map
Short Description An iterable key-value collection class.
License MIT
Homepage https://github.com/lamansky/map
Please rate this library. Is it a good library?
Informations about the package map
Map
An iterable key-value collection class for PHP.
Installation
With Composer installed on your computer and initialized for your project, run this command in your project’s root directory:
Requires PHP 7.1 or above.
The library consists of a single class: Lamansky\Map\Map
.
Basic Usage
Methods
For an understanding of what each of these methods does, refer to the unit tests in tests/MapTest.php
.
get ($key)
has ($key)
set ($key, $value)
mergeSet ($key, $value, callable $merge)
edit ($key, callable $edit)
increment ($key, $value)
decrement ($key, $value)
delete ($key)
count ()
entries ()
keys ()
values ()
map (callable $callback)
walk (callable $callback)
sort (callable $sort)
sortValuesAsc ()
sortValuesDesc ()
sortKeysAsc ()
sortKeysDesc ()
keepOnlyTheFirst (int $number)
keepOnlyTheLast (int $number)
Static Methods
fromList (iterable $items, callable $get_key)
merge (self ...$maps)
deepMerge (callable $merge, self ...$maps)
Unit Tests
To run the development test suite, execute this command:
All versions of map with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.1.0
The package lamansky/map contains the following files
Loading the files please wait ....