dhii / collections-interface
A highly ISP-compliant collection of interfaces that represent maps and lists.
v0.4.0-alpha2
2024-09-21 21:29 UTC
Requires
- php: ^7.4 | ^8.0
- psr/container: ^1.0 | ^2.0
Requires (Dev)
- phpunit/phpunit: ^9.0
- slevomat/coding-standard: ^6.0
- vimeo/psalm: ^4.6.2 | ^5.0
This package is auto-updated.
Last update: 2026-02-28 01:06:33 UTC
README
A highly ISP-compliant collection of interfaces that represent collections.
Interfaces
CountableListInterface: A list that can be iterated and counted.HasItemCapableInterface: Something that can be checked for the existence of an item.SetInterface: A list that can be checked for a value.CountableSetInterface: A set that can be counted.MapInterface: An iterable container.CountableMapInterface: A countable map.ContainerFactoryInterface: A factory ofContainerInterfaceobjects.MapFactoryInterface: A factory ofMapInterfaceobjects.HasCapableInterface: Something that can check for a given key.ContainerInterface: A container implementingHasCapableInterface.WritableContainerInterface: A container that can have mappings added and removed.WritableMapInterface: A map that can have mappings added and removed.WritableSetInterface: A set that can have items added and removed.ClearableContainerInterface: A container that can have its members cleared.