alex014 / confy
Confy the configuration utility
Installs: 13
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/alex014/confy
Requires
- php: >=7.0
This package is auto-updated.
Last update: 2025-10-29 02:43:48 UTC
README
Instalation and usage
composer require alex014/confy
<?php
use \Confy\Confy;
Confy::load('config/database.ini');
echo Confy::get('login');
print_r(Confy::getAll());
Methods
Confy::load(string $filename)load configuration file (ini, json, php, yaml formats are supported), many configuration files can be loadedConfy::get(string $name)get configuration valueConfy::has(string $name)check configuration key existanceConfy::set(string $name, $value)set configuration valueConfy::unset(string $name)delete configuration valueConfy::getAll()
Plugins
- All plugins are located in
/src/Parserdirectory. - All plugins must be named by Capitalized file extension (Ini.php -> .ini).
- All plugin classes must implement
\Confy\Interfaces\Parserinterface
Run tests
- Install PHPUnit
wget -O phpunit https://phar.phpunit.de/phpunit-9.pharandchmod +x phpunit - Run tests
./phpunit ConfyTest.php
License
MIT license