PHPackages                             dealnews/repository - 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. dealnews/repository

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

dealnews/repository
===================

In Process/Request Data Repository

v4.1.0(9mo ago)11.0k11BSD-3-ClausePHPPHP ^8.2CI passing

Since Jul 5Pushed 2mo ago5 watchersCompare

[ Source](https://github.com/dealnews/data-repository)[ Packagist](https://packagist.org/packages/dealnews/repository)[ RSS](/packages/dealnews-repository/feed)WikiDiscussions master Synced today

READMEChangelog (6)Dependencies (3)Versions (9)Used By (1)

Repository Library
==================

[](#repository-library)

This library provides a generic data repository which is capable of loading data on demand through registered callbacks and ensures the data is only loaded once while the repository object exists. This is useful if different parts of an application will need to use the same data for different purposes.

It also supports writing data through the repository.

Usage
-----

[](#usage)

### Basic Example

[](#basic-example)

```
