webservco / configuration-legacy
A PHP component/library.
v0.8.0.74
2024-06-22 15:43 UTC
Requires
- php: ^7.4
- webservco/configuration: ^0
README
Helper for legacy projects that have to use a procedural approach.
Setup
Composer require:
"webservco/configuration-legacy": "^0"
Usage
Process configuration file
config/.env.ini
[Database] DB_HOST = 127.0.0.1 DB_USER = db DB_PASSWORD = db DB_NAME = db
use WebServCo\Configuration\Service\Legacy\Procedural\Cfg; Cfg::processConfigurationFile($projectPath);
Read configuration data
use WebServCo\Configuration\Service\Legacy\Procedural\Cfg; $host = Cfg::getString('DB_HOST');