PHPackages                             mouf/database.datasource.datasource-interface - 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. [Database &amp; ORM](/categories/database)
4. /
5. mouf/database.datasource.datasource-interface

ActiveMouf-library[Database &amp; ORM](/categories/database)

mouf/database.datasource.datasource-interface
=============================================

This package only contains basic interfaces for implementing data sources.

4.0.x-dev(10y ago)04.1k2[1 PRs](https://github.com/thecodingmachine/database.datasource.datasource-interface/pulls)3MITPHPPHP &gt;=5.4

Since Mar 19Pushed 9y ago7 watchersCompare

[ Source](https://github.com/thecodingmachine/database.datasource.datasource-interface)[ Packagist](https://packagist.org/packages/mouf/database.datasource.datasource-interface)[ Docs](https://github.com/thecodingmachine/database.datasource.datasource-interface)[ RSS](/packages/mouf-databasedatasourcedatasource-interface/feed)WikiDiscussions 4.0 Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (3)

[![Latest Stable Version](https://camo.githubusercontent.com/e188eafedfff20d56cfa913d29af7984db32e25b6558f40c3f66379e6e9ec5c3/68747470733a2f2f706f7365722e707567782e6f72672f6d6f75662f64617461626173652e64617461736f757263652e64617461736f757263652d696e746572666163652f762f737461626c65)](https://packagist.org/packages/mouf/database.datasource.datasource-interface) [![Total Downloads](https://camo.githubusercontent.com/b8a994f600044beab1f3541a9286b28a34e3da8dfc4a38b89f50d8667109a924/68747470733a2f2f706f7365722e707567782e6f72672f6d6f75662f64617461626173652e64617461736f757263652e64617461736f757263652d696e746572666163652f646f776e6c6f616473)](https://packagist.org/packages/mouf/database.datasource.datasource-interface) [![Latest Unstable Version](https://camo.githubusercontent.com/c132fc7b2a7f8999a6d80a4201033230adc957a9019fa425d4aaa231eb056e27/68747470733a2f2f706f7365722e707567782e6f72672f6d6f75662f64617461626173652e64617461736f757263652e64617461736f757263652d696e746572666163652f762f756e737461626c65)](https://packagist.org/packages/mouf/database.datasource.datasource-interface) [![License](https://camo.githubusercontent.com/f30077b8904dbf153001ce634e6df7c8b2fd715d86adcdfb198acfd521414835/68747470733a2f2f706f7365722e707567782e6f72672f6d6f75662f64617461626173652e64617461736f757263652e64617461736f757263652d696e746572666163652f6c6963656e7365)](https://packagist.org/packages/mouf/database.datasource.datasource-interface)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/c7d5458d1265b3764ea554a3093110fd30fe68c96f63fbf8e52f4f0eb78420b1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746865636f64696e676d616368696e652f64617461626173652e64617461736f757263652e64617461736f757263652d696e746572666163652f6261646765732f7175616c6974792d73636f72652e706e673f623d342e30)](https://scrutinizer-ci.com/g/thecodingmachine/database.datasource.datasource-interface/?branch=4.0)[![Build Status](https://camo.githubusercontent.com/0e28e4c3341b7905a735642e1aa37004b1ab95bd00fc426331e569eaaf31763e/68747470733a2f2f7472617669732d63692e6f72672f746865636f64696e676d616368696e652f64617461626173652e64617461736f757263652e64617461736f757263652d696e746572666163652e7376673f6272616e63683d342e30)](https://travis-ci.org/thecodingmachine/database.datasource.datasource-interface)[![Coverage Status](https://camo.githubusercontent.com/86c5fc97d6366289da15f38957292317bca0d6859841dc58b386be3ef7ad1b4a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f746865636f64696e676d616368696e652f64617461626173652e64617461736f757263652e64617461736f757263652d696e746572666163652f62616467652e7376673f6272616e63683d342e3026736572766963653d676974687562)](https://coveralls.io/github/thecodingmachine/database.datasource.datasource-interface?branch=4.0)

Datasources for Mouf
====================

[](#datasources-for-mouf)

You can find in this package two very useful interfaces:

- `DataSourceInterface`: a DataSource that represents an array of arrays
- `RowInterface`: a Row that is the representation of a key indexed array.

Known implementations
---------------------

[](#known-implementations)

- MagicQuery (TODO)

This packages contains 2 very basic implementations of these interfaces:

- The `Row` class maps a key indexed array into a `RowInterface`
- The `DataSource` class maps an array of array into a `DataSourceInterface`

Modifiers
---------

[](#modifiers)

This package comes with a set of utility classes to transform rows and datasources:

- `RowMapper` creates an "output" row from an "input" row and a set of `Pickers` (implementing the `PickerInterface`)
- `ArrayMapper` creates an "output" datasource from an "input" datasource and a set of `Pickers` (implementing the `PickerInterface`)

This package comes with 2 pickers (implementing the `PickerInterface`):

- `RowPicker`: selects one value in a row
- `CallbackPicker`: applies a callback function to a row and returns the value of the callback

Finally, the `RowBuilder` class can be used to merge rows, add a row as a key of a row or to add datasources as keys of a row.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.1% 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 ~1031 days

Total

2

Last Release

3776d ago

Major Versions

3.0.x-dev → 4.0.x-dev2016-01-15

PHP version history (2 changes)3.0.x-devPHP &gt;=5.3.0

4.0.x-devPHP &gt;=5.4

### Community

Maintainers

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

---

Top Contributors

[![moufmouf](https://avatars.githubusercontent.com/u/1290952?v=4)](https://github.com/moufmouf "moufmouf (4 commits)")[![nguyenk](https://avatars.githubusercontent.com/u/2227554?v=4)](https://github.com/nguyenk "nguyenk (2 commits)")[![npeguin](https://avatars.githubusercontent.com/u/2227721?v=4)](https://github.com/npeguin "npeguin (1 commits)")

---

Tags

datasourcemouf

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mouf-databasedatasourcedatasource-interface/health.svg)

```
[![Health](https://phpackages.com/badges/mouf-databasedatasourcedatasource-interface/health.svg)](https://phpackages.com/packages/mouf-databasedatasourcedatasource-interface)
```

###  Alternatives

[mouf/magic-query

A very clever library to help you with SQL: generate prepared statements with a variable number of parameters, automatically writes joins... and much more!

22256.8k3](/packages/mouf-magic-query)

PHPackages © 2026

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