mundanity / collection
A simple PHP based collection.
Installs: 90 127
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 5
Open Issues: 1
Requires
- php: ~5.6 || ~7.1
Requires (Dev)
- phpunit/phpunit: ~5.2.0
This package is not auto-updated.
Last update: 2024-12-22 06:44:51 UTC
README
A simple PHP based collection.
Usage
For basic usage, use the provided base class of Collection or KeyedCollection. Each class has a mutable counterpart.
<?php $collection = new Collection([1, 2, 3]); $collection->has(2); // true $mutable = MutableCollection::fromCollection($collection); $mutable->remove(2); $mutable->has(2); // false