Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/piotrpress/configer
- Owner: PiotrPress
- License: mit
- Created: 2022-09-20T13:27:22.000Z (about 2 years ago)
- Default Branch: 2.x
- Last Pushed: 2023-04-13T17:02:08.000Z (over 1 year ago)
- Last Synced: 2024-10-13T03:09:53.190Z (about 1 month ago)
- Topics: array, arrayaccess, arrayobject, config, config-file, configer, configuration, configuration-file, php
- Language: PHP
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.txt
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)