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

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

plumphp/plum-collection
=======================

Integrations the Cocur\\Collection component into Plum.

v0.1.1(11y ago)123MITPHP

Since Apr 28Pushed 3y ago1 watchersCompare

[ Source](https://github.com/plumphp/plum-collection)[ Packagist](https://packagist.org/packages/plumphp/plum-collection)[ RSS](/packages/plumphp-plum-collection/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (5)Versions (4)Used By (0)

 [![Plum](https://camo.githubusercontent.com/a81342cbfd6f64a484988488ad37bbd0e665d0f14f65ec655ae986097447bfb6/687474703a2f2f63646e2e666c6f7269616e2e65632f706c756d2d6c6f676f2e737667)](https://camo.githubusercontent.com/a81342cbfd6f64a484988488ad37bbd0e665d0f14f65ec655ae986097447bfb6/687474703a2f2f63646e2e666c6f7269616e2e65632f706c756d2d6c6f676f2e737667)
==================================================================================================================================================================================================================================================================================================================================================================

[](#----)

> PlumCollection integrates [Cocur\\Collection](https://github.com/cocur/collection) into Plum. Plum is a data processing pipeline for PHP.

[![Latest Version](https://camo.githubusercontent.com/a516f4c9565f01eaab228ecb83d337f3705d7a297e123c0df09e08c46d5ff1e1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706c756d7068702f706c756d2d636f6c6c656374696f6e2e737667)](https://packagist.org/packages/plumphp/plum-collection)[![Build Status](https://camo.githubusercontent.com/a5812af3acbfde8f68fcd366e1d01ffcb0bdbd277c70cc60be135392a4c4d651/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f706c756d7068702f706c756d2d636f6c6c656374696f6e2e7376673f7374796c653d666c6174)](https://travis-ci.org/plumphp/plum-collection)[![Windows Build status](https://camo.githubusercontent.com/133d7c41c155664526f22b9a60a25a0fe98daed7aa7d7ea0e86afae5329a32da/68747470733a2f2f63692e6170707665796f722e636f6d2f6170692f70726f6a656374732f7374617475732f3138786a357433613869313379616b623f7376673d74727565)](https://ci.appveyor.com/project/florianeckerstorfer/plum-collection)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/3f66589437229ae984866cf98a6e44e0c346af67c5fcc2027c3d2c81c23bb1e0/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f706c756d7068702f706c756d2d636f6c6c656374696f6e2e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/plumphp/plum-collection/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/5fb2014922fd2a852512fea5d5f67cb2e2113f5c0f19951ab24bdae6f0f7a3d8/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f706c756d7068702f706c756d2d636f6c6c656374696f6e2e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/plumphp/plum-collection/?branch=master)[![StyleCI](https://camo.githubusercontent.com/ea167f2263cbb8ff06f774bce78693a75a258b0f86d9570fa7d0697144faf4ac/68747470733a2f2f7374796c6563692e696f2f7265706f732f33343735303334392f736869656c64)](https://styleci.io/repos/34750349)

Developed by [Florian Eckerstorfer](https://florian.ec) in Vienna, Europe.

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

[](#installation)

You can install PlumCollection using [Composer](http://getcomposer.org).

```
$ composer require plumphp/plum-collection
```

Usage
-----

[](#usage)

Please refer to the [Plum documentation](https://github.com/plumphp/plum/blob/master/docs/index.md) for more information about using Plum in general.

PlumCollection provides converts to convert items into elements of a collection.

### `ItemConverter`

[](#itemconverter)

`Plum\PlumCollection\ItemConverter` converts the given item into an instance of `Cocur\Collection\Item` and adds it to the collection.

```
use Plum\PlumCollection\ItemConverter;
use Cocur\Collection\Collection;

$collection = new Collection();
$converter = new ItemConverter($collection);

$converter->convert('foobar'); // -> Cocur\Collection\Item
$collection->count(); // -> 1
```

### `ArrayItemConverter`

[](#arrayitemconverter)

`Plum\PlumCollection\ArrayItemConverter` converts the given item into an instance of `Cocur\Collection\ArrayItem` and adds it to the collection.

```
use Plum\PlumCollection\ArrayItemConverter;
use Cocur\Collection\Collection;

$collection = new Collection();
$converter = new ArrayItemConverter($collection);

$converter->convert(['foo' => 'bar']); // -> Cocur\Collection\ArrayItem
$collection->count(); // -> 1
```

Change Log
----------

[](#change-log)

### Version 0.1.1 (17 May 2015)

[](#version-011-17-may-2015)

- Update dependency to Cocur\\Collection

### Version 0.1 (28 April 2015)

[](#version-01-28-april-2015)

- Initial release

License
-------

[](#license)

The MIT license applies to plumphp/plum-collection. For the full copyright and license information, please view the [LICENSE](https://github.com/plumphp/plum-collection/blob/master/LICENSE) file distributed with this source code.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 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 ~1337 days

Total

3

Last Release

1411d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a80f9fc61cd3a7d7779e8f120b458ca4d18fdd885d719bb77d3379b96bf714d9?d=identicon)[florianeckerstorfer](/maintainers/florianeckerstorfer)

---

Top Contributors

[![florianeckerstorfer](https://avatars.githubusercontent.com/u/149201?v=4)](https://github.com/florianeckerstorfer "florianeckerstorfer (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[stillat/proteus

Provides utilities for parsing and updating Laravel-style PHP configuration files.

18350.0k39](/packages/stillat-proteus)[kunstmaan/seo-bundle

Annotating content with metadata for social sharing and seo purposes cannot be overlooked nowadays. The KunstmaanSeoBundle contains default editing functionality for OpenGraph data, meta descriptions, keywords and titles and Metriweb tags. Because the metatagging and tracking options are always changing, a free field to add custom header information is provided as well.

28132.1k2](/packages/kunstmaan-seo-bundle)[magewirephp/magewire-requirejs

A Magento 2 module which makes Magewire compatible with RequireJS based themes

1426.3k20](/packages/magewirephp-magewire-requirejs)

PHPackages © 2026

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