Download the PHP package narrowspark/arr without Composer
On this page you can find all versions of the php package narrowspark/arr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download narrowspark/arr
More information about narrowspark/arr
Files in narrowspark/arr
Package arr
Short Description A collection of utilities to manipulate arrays.
License MIT
Homepage https://github.com/narrowspark/arr
Informations about the package arr
A PHP collection of utilities to manipulate arrays. Compatible with, PHP 7 and Php 7.1.
Master
Develop
- Installation
- Arr
- Access methods
- set
- get
- add
- has
- put
- exists
- update
- forget
- Enumerator
- random
- only
- split
- isAssoc
- isIndexed
- Transform
- pop
- swap
- every
- combine
- collapse
- divide
- stripEmpty
- unique
- without
- reindex
- merger
- extend
- asHierarchy
- groupBy
- dot
- flatten
- expand
- reset
- extendDistinct
- sortRecursive
- zip
- Traverse
- map
- filter
- all
- reject
- where
- first
- last
- Access methods
Why?
Installation
Via Composer
or
Arr
All methods listed under "Arr".
set
Set an array item to a given value using "dot" notation. If no key is given to the method, the entire array will be replaced.
get
Get an item from an array using "dot" notation. If key dont exist, you get a default value back.
add
Add an element to the array at a specific location using the "dot" notation.
has
Check if an item exists in an array using "dot" notation.
update
Updates data at the given path.
forget
Remove one or many array items from a given array using "dot" notation.
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
From the project directory, tests can be ran using phpunit
Contributing
Please see CONTRIBUTING for details.
Credits
- Daniel Bannert
- All Contributors
License
The MIT License (MIT). Please see License File for more information.