PHPackages                             label305/belt - 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. label305/belt

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

label305/belt
=============

Helping you to import/export data in a memory efficient way

v1.0(6y ago)225.4k↓50%3[1 PRs](https://github.com/Label305/Belt/pulls)PHP

Since Jun 28Pushed 5y ago4 watchersCompare

[ Source](https://github.com/Label305/Belt)[ Packagist](https://packagist.org/packages/label305/belt)[ RSS](/packages/label305-belt/feed)WikiDiscussions master Synced 1mo ago

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

Belt
====

[](#belt)

[![Build Status](https://camo.githubusercontent.com/c8366030260448fd4e1aeb2edb01899c79f961d11a73e669952fd544af2c6c3c/68747470733a2f2f7472617669732d63692e6f72672f4c6162656c3330352f42656c742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Label305/Belt)

Helping us to generate exports and process import in a memory efficient way.

Usage
-----

[](#usage)

TL;DR write a data `Provider`, transform it with a `Transformer` so that your `Assembler` can write to your persistence.

Exporting/importing is nothing more than transformation from one datasource and writing to another. So there are a few main parts that come into play `Provider`, `Transformer`, `Assembler` and `Persister`.

The `Provider`, this will take care of feeding the system with data. Using a generator function a file, stream, database can be read and provided in the form of `DataBags`, a `DataBag` is a simple key/value store with which the system knows how to cope.

Now each `DataBag` is passed through a `Transformer` which will create an (associative) array. This `Transformer` will "decide" how the output will look and decides about order of fields, available fields etc.

After transformation an `Assembler` will take over, this is the step that will actually create some output. This can be a line of a CSV, but, since it knows its limitations, also a combined associative array that after everything is done will compile to a JSON blob.

This `Assembler` step will also manage what is passed to a `Persister`. Which can be your own repository or one borrowed from us, such as the `FilePersister`, which will, in the case of CSV's, neatly write every line one after another.

License
-------

[](#license)

Copyright 2016 Label305 B.V.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity59

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

Unknown

Total

1

Last Release

2516d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/411527?v=4)[Label305](/maintainers/Label305)[@Label305](https://github.com/Label305)

---

Top Contributors

[![JBlaak](https://avatars.githubusercontent.com/u/410113?v=4)](https://github.com/JBlaak "JBlaak (12 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/label305-belt/health.svg)

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

PHPackages © 2026

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