piotrpress/initer

This library reads/writes flat array data from/to key=value format compatible with .ini and .env files.

v1.0.0 2023-05-04 17:02 UTC

This package is not auto-updated.

Last update: 2024-11-01 22:21:05 UTC


README

This library reads/writes flat array data from/to key=value format compatible with .ini and .env files.

Installation

$ composer require piotrpress/initer

Usage

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

use PiotrPress\Initer;

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

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

$config->save();

Requirements

  • PHP >= 7.4 version.
  • Ctype extension.

License

MIT