covaleski / collection
Library for complex array and object operations.
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/covaleski/collection
Requires (Dev)
- laravel/pint: ^1.17
- phpunit/phpunit: ^11.3
README
Type agnostic wrapper to manipulate objects and arrays.
Features
- Implement
ArrayAccess - Implement
Coutable - Implement
Iterator -
all() -
assign($column, $value) -
column($key) -
contains($value) -
copy() -
count() -
drop($column) -
every($callback) -
filter($callback) -
find($callback) -
first() -
get() -
isset($key) -
keys() -
last() -
map($callback) -
merge(...$collections) -
nth($index) -
pop() -
push($value) -
reduce($callback) -
reverse() -
search($value) -
set($key, $value) -
shift() -
slice($offset, $length) -
some($callback) -
sort($callback) -
unique() -
unset($key) -
unshift($value) -
values() -
walk($callback)