typomedia / ini
Parse and dump INI files
1.1.0
2022-11-02 18:46 UTC
Requires
- php: >=7.3
Requires (Dev)
- ext-json: *
- laminas/laminas-config: ^3.3
- matomo/ini: ^3.0
- phpbench/phpbench: ^1.2
- phpmd/phpmd: ^2.13
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.7
This package is auto-updated.
Last update: 2024-10-30 01:48:12 UTC
README
The INI component loads and dumps INI configs.
The Library is PSR-1, PSR-4, PSR-12 compliant and a replacement for parse_ini_string()
without limitations for nested properties.
Unit Tests have a Code Coverage of 100%!
Requirements
>= PHP 7.3
Dependencies
none
Install
composer require typomedia/ini
Usage
Parser
use Typomedia\Ini\Parser; $ini = file_get_contents('tests/Fixtures/Array.ini'); $parser = new Parser(); $array = $parser->parse($ini);
Dumper
use Typomedia\Ini\Dumper; $array = ['Section' => ['Property' => 'Value']]; $dumper = new Dumper(); $ini = $dumper->dump($array);