covaleski / collection
Library for complex array and object operations.
v1.3.0
2025-02-25 01:06 UTC
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)