PHPackages                             fsi/datasource - 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. fsi/datasource

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

fsi/datasource
==============

FSi DataSource Component

2.1.1(5y ago)837.9k8[1 issues](https://github.com/fsi-open/datasource/issues)3MITPHPPHP ^7.1|^8.0CI failing

Since Feb 7Pushed 5y ago7 watchersCompare

[ Source](https://github.com/fsi-open/datasource)[ Packagist](https://packagist.org/packages/fsi/datasource)[ RSS](/packages/fsi-datasource/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (7)Dependencies (9)Versions (43)Used By (3)

FSi DataSource Component
========================

[](#fsi-datasource-component)

DataSource allows to fetch data from various sources using different drivers. It supports pagination and through fields (that driver or its extensions must provide) allows to give various conditions, that fetched data must fulfill.

DataSource to fetch specific kind of data (from database, xml, json, etc.) must be created with properly configured driver, that will implement methods to get that kind of data.

Available drivers
-----------------

[](#available-drivers)

- [Collection](doc/en/drivers/collection.md)
- [Doctrine ORM](doc/en/drivers/doctrine-orm.md)

Basic usage
-----------

[](#basic-usage)

Let's assume we want to create DataSource with DoctrineDriver (you can find documentation for specific drivers in `doc`folder) that allows us to fetch some data through Doctrine ORM. For our example let's assume we have a News object (entity) with id, title, author, create date, short content and content. We will need only a `$managerRegistry` instance. Then we can create `$datasource` instance.

```
