struktal / struktal-config
PHP library for configuring Struktal applications
1.0.1
2025-08-19 12:02 UTC
Requires
- php: >=8.2.0
README
This is a PHP library for configuring Struktal applications.
Installation
To install this library, include it in your project using Composer:
composer require struktal/struktal-config
Usage
Before you can use this library, you need to customize a few parameters. You can do this in the startup of your application:
\struktal\Config\Config::setConfigDirectory("path/to/your/config.json");
Then, you can use the library's features in your code.
Read information from your config
To read information from the config file, you can use the Config
class:
$config = new \struktal\Config\Config(); $configVar = $config->get("configVar"); $nestedConfigVar = $config->get("nested", "configVar"); $defaultConfigVar = $config->getDefault(42, "defaultConfigVar");
License
This software is licensed under the MIT license. See the LICENSE file for more information.