PHPackages                             krak/coll - 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. krak/coll

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

krak/coll
=========

PHP Collections Library

v0.1(10y ago)0840MITPHP

Since Apr 25Pushed 10y ago1 watchersCompare

[ Source](https://github.com/krakphp/coll)[ Packagist](https://packagist.org/packages/krak/coll)[ RSS](/packages/krak-coll/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (2)Used By (0)

Coll (Collections)
==================

[](#coll-collections)

The Collections library is yet another attempt to generate OO collections in php.

Currently, the only collection in here is the Set because that's the only collection PHP actually is missing.

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

[](#installation)

```
compose require krak/coll

```

Usage
-----

[](#usage)

### Set

[](#set)

A set represents a set of unique values.

There are two interfaces for the Set type: `ConstSet` and `Set`.

Const sets allow read access only whereas Sets allow read write access.

```
// const methods
public function get($value);
public function has($value);
public function count();
public function getIterator();

// non-const methods
public function add($value);
public function remove($value);

```

```
