PHPackages                             activecollab/configrepository - 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. activecollab/configrepository

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

activecollab/configrepository
=============================

Configuration repository

1.0.0(10y ago)1446MITPHP

Since Dec 16Pushed 10y ago7 watchersCompare

[ Source](https://github.com/activecollab/configrepository)[ Packagist](https://packagist.org/packages/activecollab/configrepository)[ RSS](/packages/activecollab-configrepository/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (4)Versions (3)Used By (0)

Configuration Repository
========================

[](#configuration-repository)

[![Build Status](https://camo.githubusercontent.com/0e683cd849752159e09b3414fe41255b6bcc97d6d7e3a23daf2dcb8c21d9d042/68747470733a2f2f7472617669732d63692e6f72672f616374697665636f6c6c61622f636f6e6669677265706f7369746f72792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/activecollab/configrepository)

This package provides a way to compose a configuration repository that reads and write options from serveral sources.

Existing adapters:

1. `DotEnvAdapter` - load environment variables from `.env` file (read-only),
2. `EtcdAdapter` - read and write options from and to etcd cluster,
3. `PhpConstantsAdapter` - load options from regular PHP file full of constants. Note that this file is not included, but parsed statically, so you don't need to worry that these constants will be defined in your code.

To write your own adapters, simply implement `ActiveCollab\ConfigRepository\AdapterInterface`.

Working with data
-----------------

[](#working-with-data)

Repository provides a couple of confenient methods to retrive and set the data:

```
