mini\Contracts\CollectionInterface abstract interface

Documentation

Traversable collection with functional transformation methods

Represents a sequence of items that can be iterated, counted, and transformed using functional operations like map() and filter(). All transformation methods return new CollectionInterface instances (immutable).

Inheritance

Implements: IteratorAggregate Countable JsonSerializable Traversable

Methods (14)

Transform each item using a closure

Filter items using a closure

Get the first item, or null if empty

Get the last item, or null if empty

Check if collection is empty

Reduce collection to a single value

Get all items as an array

Check if any item matches the predicate

Check if no items match the predicate

Check if all items match the predicate

Find the first item matching the predicate

Documentation missing

Documentation missing

Documentation missing

Source

src/Contracts/CollectionInterface.php:20-108