piotrpress/configer

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

v2.0.0 2023-04-13 17:00 UTC

This package is auto-updated.

Last update: 2024-10-13 20:06:32 UTC


README

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

Installation

$ composer require piotrpress/configer

Usage

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