PHPackages                             imatic/data-bundle - 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. imatic/data-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

imatic/data-bundle
==================

Bundle to work with data

v7.0.0(2w ago)16.7k[2 PRs](https://github.com/imatic/data-bundle/pulls)1MITPHPPHP ^8.5CI failing

Since Feb 10Pushed 2w ago5 watchersCompare

[ Source](https://github.com/imatic/data-bundle)[ Packagist](https://packagist.org/packages/imatic/data-bundle)[ Docs](https://www.imatic.cz)[ RSS](/packages/imatic-data-bundle/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (28)Versions (74)Used By (1)

[![Build Status](https://camo.githubusercontent.com/80bdb6e540109c5f1cfd13a612a0b75d318e18affcad97bb6ff9d4e5e223efad/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f696d617469632f646174612d62756e646c652e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/imatic/data-bundle)

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](LICENSE)ImaticDataBundle
----------------

[](#imaticdatabundle)

This [bundle](https://symfony.com/doc/current/bundles.html) makes it easy to work with data.

### Main goals of the bundle

[](#main-goals-of-the-bundle)

- Accessing data in uniform way (no matter where they are stored) and possibility to have filtering, sorting, paging capabilities with small effort.
- Executing arbitrary operations (activating users, making orders in eshop...) in uniform way (no matter if the operation was executed by user from a browser, via some message queues, console or something else).

### Accessing data in uniform way

[](#accessing-data-in-uniform-way)

This bundle uses query objects to retrieve/store data from arbitrary storage. Currently, we have drivers for [doctrine dbal](http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/introduction.html#introduction)and [doctrine orm](http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/tutorials/getting-started.html#what-is-doctrine). Other drivers can be relatively easily implemented.

All query objects have to implement `QueryObjectInterface` of specific driver in order to query data.

#### Example of querying active users using doctrine orm driver

[](#example-of-querying-active-users-using-doctrine-orm-driver)

First we need to create query of active users.

```
