PHPackages                             daggerhartlab/collections - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. daggerhartlab/collections

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

daggerhartlab/collections
=========================

Various types of collection classes.

v2.0.0(3y ago)0762GPL-2.0-or-laterPHPPHP &gt;=7.3

Since Jun 28Pushed 3y agoCompare

[ Source](https://github.com/daggerhartlab/collections)[ Packagist](https://packagist.org/packages/daggerhartlab/collections)[ RSS](/packages/daggerhartlab-collections/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (2)Versions (9)Used By (0)

Collections
===========

[](#collections)

Simple set of collection classes.

TypeDescription`Collection`A collection is one dimensional list of items that is unconcerned about the name of the individual items.`TypedCollection`A collection that only allows one data type into the list.`Registry`A registry is a collection of items where each item in the registry has a unique name.`TypedRegistry`A registry that only allows one data type into the collection.`ClassRegistry`A registry that expects the item values to be fully namespaced class names. It can reflect and instantiate the registered classes.`TraversableRegistry`A multidimensional registry where deeply nested values can be accessed using dot notation.Collection Examples
-------------------

[](#collection-examples)

All collections share the same methods.

MethodDescription`all()`Get the entire collection as an array.`add(item)`Add an item to the collection.`first()`Get the first item in the collection.`last()`Get the last item in the collection.`map(callable)`Perform a callback on each item in the collection.`filter(callable)`Create a new collection that has filtered out some items.### Basic `Collection`

[](#basic-collection)

A collection is one dimensional list of items that is unconcerned about the name of the individual items.

```
