Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/piotrpress/configer

This library loads/saves php array from/to a configuration file.
https://github.com/piotrpress/configer

array arrayaccess arrayobject config config-file configer configuration configuration-file php

Last synced: 5 days ago
JSON representation

This library loads/saves php array from/to a configuration file.

Awesome Lists containing this project

README

        

# Configer

This library loads/saves php array from/to a configuration file.

## Installation

```shell
$ composer require piotrpress/configer
```

## Usage

```php
require __DIR__ . '/vendor/autoload.php';

use PiotrPress\Configer;

$config = new Configer( '.config', [
'key' => 'value'
] );

echo $config[ 'key' ];
$config[ 'key' ] = 'new_value';

$config->save();
```

## Requirements

* Branch `2.x` supports PHP >= `8.0` version.
* Branch `1.x` supports PHP ^`7.4` version.

## License

[MIT](license.txt)