PHPackages                             xayan/dataflow - 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. xayan/dataflow

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

xayan/dataflow
==============

A data manipulation library

v1.0.1(7y ago)010MITPHP

Since Sep 10Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Xayan/DataFlow)[ Packagist](https://packagist.org/packages/xayan/dataflow)[ RSS](/packages/xayan-dataflow/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

DataFlow
========

[](#dataflow)

###### A multi-purpose data manipulation library

[](#a-multi-purpose-data-manipulation-library)

A data manipulation library is meant to, well, manipulate data. This library introduces two main classes: `Entity` and `EntityCollection`. The first one accumulates data, the second one allows batch operations on entities. But that's not all, another feature of this library is data import/export. As for now, only CSV files are supported, but more are to come. That way you can easily make scripts that will import some data, process it and then output it in desired form (a string or a file).

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

[](#installation)

Package is available through composer:

`composer require xayan/dataflow`

Usage
-----

[](#usage)

Let's assume the following CSV file:

`λ cat your_file.csv`

```
id,firstName,lastName,age
1,John,Doe,10
2,Mickey,Mouse,50
3,Philip J.,Fry,25
```

Now, let's say we want to filter this data to contain only adults. Also, I don't like the fact that first name and last name are separated. So let's change that:

```
