PHPackages                             sideclick/data-container - 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. sideclick/data-container

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

sideclick/data-container
========================

This class provides a way to easily iterate through the results of a query \* or query builder. Or get the total results of the query/querybuilder \* or retrieve a KNP\_Pagination of the query/query builder

0.1.1(9y ago)113MITPHPPHP &gt;=5.5

Since Sep 13Pushed 9y ago2 watchersCompare

[ Source](https://github.com/Sideclick/DataContainer)[ Packagist](https://packagist.org/packages/sideclick/data-container)[ RSS](/packages/sideclick-data-container/feed)WikiDiscussions master Synced 1mo ago

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

DataContainer
=============

[](#datacontainer)

This class provides a way to easily work with the results of a Doctrine Query or QueryBuilder object as if it is an array. You may also use the class to retrive a KNP\_Pagination object for the query or retrieve the query itself off the DataContainer.

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

[](#installation)

Require via composer:

```
require sideclick/data-container

```

Or add the following to the "require" section of composer.json

```
"sideclick/data-container": "dev-master"

```

And then run a composer update

Usage
-----

[](#usage)

### Step 1 Use the class:

[](#step-1-use-the-class)

```
use Sideclick\Utils\DataContainer;

```

### Step 2 Initiate an instance

[](#step-2-initiate-an-instance)

For example in a controller:

```
$em = $this->getDoctrine()->getManager();
$queryBuilder =
$em->getRepository('RoadToHealthBundle:User')
  ->createQueryBuilder('u');

$dataContainer = new DataContainer($queryBuilder);

```

Note that the DataContainer constructor can take a Doctrine QueryBuilder or Doctrine Query object as the parameter. Thereafter you may access the DataContainer object as an array. The following methods are also worth noting:

```
// Return the Query Builder (will return NULL if a Doctrine Query was passed in the constructor)
$dataContainer->getQueryBuilder();

// Return a KnpPaginator object for the Query
$dataContainer->getPagination($page = 1, $countPerPage = 10);

```

And thats it!
-------------

[](#and-thats-it)

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

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

Total

2

Last Release

3577d ago

### Community

Maintainers

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

---

Top Contributors

[![RowanReid](https://avatars.githubusercontent.com/u/5764663?v=4)](https://github.com/RowanReid "RowanReid (6 commits)")

### Embed Badge

![Health badge](/badges/sideclick-data-container/health.svg)

```
[![Health](https://phpackages.com/badges/sideclick-data-container/health.svg)](https://phpackages.com/packages/sideclick-data-container)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k12](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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