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

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

phpsoftbox/collection
=====================

Collection component for the PhpSoftBox framework

0145↓91.1%PHP

Since Mar 6Pushed 3mo agoCompare

[ Source](https://github.com/phpsoftbox/collection)[ Packagist](https://packagist.org/packages/phpsoftbox/collection)[ RSS](/packages/phpsoftbox-collection/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

PhpSoftBox Collection
=====================

[](#phpsoftbox-collection)

Строго типизированная коллекция для работы с массивами в стиле fluent API: выборка (`only/except`), трансформации (`map/filter/reduce`), dot-нотация для вложенных структур (`getPath/setPath`), сортировка, чанки, слияние.

Установка
---------

[](#установка)

```
composer require phpsoftbox/collection
```

QuickStart
----------

[](#quickstart)

```
use PhpSoftBox\Collection\Collection;

$users = Collection::from([
    ['id' => 1, 'name' => 'Alice', 'active' => true],
    ['id' => 2, 'name' => 'Bob',   'active' => false],
]);

$names = $users
    ->filter(fn (array $u) => $u['active'])
    ->map(fn (array $u) => $u['name'])
    ->values()
    ->all();

// ['Alice']

$config = Collection::from([])
    ->setPath('db.host', 'localhost')
    ->setPath('db.port', 3306)
    ->all();

// ['db' => ['host' => 'localhost', 'port' => 3306]]
```

Документация
------------

[](#документация)

Справочник по всем методам: [`docs/index.md`](docs/index.md)

Лицензия
--------

[](#лицензия)

MIT

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance52

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0279d150240c97d210034878b0467462246dc14d29b5618157ff6a8be49a50e3?d=identicon)[inspector-who](/maintainers/inspector-who)

---

Top Contributors

[![inspector-who](https://avatars.githubusercontent.com/u/6973963?v=4)](https://github.com/inspector-who "inspector-who (2 commits)")

### Embed Badge

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

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

###  Alternatives

[lamoda/enum-bundle

Utility wrapper around PHP-enum

101.6k](/packages/lamoda-enum-bundle)

PHPackages © 2026

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