PHPackages                             wok/collection - 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. wok/collection

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

wok/collection
==============

Data collection manager

v1.0.4(9y ago)0871MITPHP

Since Sep 13Pushed 9y ago1 watchersCompare

[ Source](https://github.com/web-operational-kit/collection)[ Packagist](https://packagist.org/packages/wok/collection)[ RSS](/packages/wok-collection/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (7)Used By (1)

Collection
==========

[](#collection)

This library is lightweight **collection manager**.

[![SensioLabsInsight](https://camo.githubusercontent.com/f8df7fc93924a5fd604dca4c77ef40551d752cf9adba2b21bfc55bcc3b76b87a/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f35633938323535652d663138302d343561632d616164622d6163636532626632323962312f6269672e706e67)](https://insight.sensiolabs.com/projects/5c98255e-f180-45ac-aadb-acce2bf229b1)

**Diclaimer :** This component is part of the [WOK](https://github.com/web-operational-kit/) (Web Operational Kit) framework. It however can be used as a standalone library.

Install
-------

[](#install)

It is recommanded to install that component as a dependency using [Composer](https://getcomposer.org/) :

```
composer require wok/collection

```

You're also free to get it with [git](https://git-scm.com/) or by [direct download](https://github.com/web-operational-kit/collection/archive/master.zip) while this package has no dependencies.

```
git clone https://github.com/web-operational-kit/collection.git

```

Features
--------

[](#features)

As this component roles are to be a data container and manager, it's features are related to collection data manipulation.

However, it has also been developed to be a dependency that other components can require and extend.

Usage
-----

[](#usage)

```
// Register the data collection
$collection = new \WOK\Collection\Collection(array(
    'a' => 'value',
    'b' => 'value',
    'c' => 'value',
));

$collection->add(array('key'=>'value')); // Add some data

$exists = $collection->has($key); // Check if a data exists by it's key
$value  = $collection->get($key); // Get a data value by it's key
$collection->remove($key); // Remove a data

$data =  $collection->all(); // Get the all data collection as array

// Iterate through the collection
foreach($collection as $key => $data) {

    // Play with the data list

}
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~44 days

Total

5

Last Release

3402d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2820221?v=4)[Sébastien ALEXANDRE](/maintainers/graphidev)[@graphidev](https://github.com/graphidev)

---

Top Contributors

[![graphidev](https://avatars.githubusercontent.com/u/2820221?v=4)](https://github.com/graphidev "graphidev (6 commits)")

### Embed Badge

![Health badge](/badges/wok-collection/health.svg)

```
[![Health](https://phpackages.com/badges/wok-collection/health.svg)](https://phpackages.com/packages/wok-collection)
```

###  Alternatives

[kra8/laravel-snowflake

Snowflake for Laravel and Lumen.

188434.9k8](/packages/kra8-laravel-snowflake)[worksome/coding-style

Worksomes coding style

49799.3k64](/packages/worksome-coding-style)[fabianmichael/kirby-meta

Your all-in-one powerhouse for any SEO and metadata needs imaginable.

7011.3k1](/packages/fabianmichael-kirby-meta)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
