PHPackages                             harbor/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. harbor/collections

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

harbor/collections
==================

Generic Collection Classes

2.0.3(11y ago)4124MITPHPPHP &gt;=5.4

Since May 15Pushed 10y agoCompare

[ Source](https://github.com/harborphp/collections)[ Packagist](https://packagist.org/packages/harbor/collections)[ RSS](/packages/harbor-collections/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (1)Versions (7)Used By (0)

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

[](#collections)

A Generic Collections implementation.

The Trait implements all of the methods for the following interfaces:

- Harbor\\Collections\\CollectionInterface
- ArrayAccess
- Countable
- IteratorAggregate
- JsonSerializable

The `Harbor\Collections\Collection` class simply `use`s the Trait and implements those interfaces, plus adds a constructor.

Installation
------------

[](#installation)

```
composer require "harbor/collections:2.0.*"

```

Requirements
------------

[](#requirements)

PHP 5.4+

Usage
-----

[](#usage)

### As Trait

[](#as-trait)

```
