ifcastle / configurator-ini
Configurator component.
Installs: 21
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:ifcastle-component
Requires
- ifcastle/application: ^0.7
- ifcastle/di: ^0.7
- ifcastle/os-utilities: ^0.5
- ifcastle/service-manager: ^0.6
Requires (Dev)
- ifcastle/codestyle: ^0.1.7
- phpstan/phpstan: ^1.12
- phpunit/phpunit: ^11.4
README
A simple ini-configurator for the IfCastle
framework.
Implement the main application configuration and service configuration.
The package implements the following interfaces:
ConfigInterface
RepositoryReaderInterface
ServiceCollectionInterface
ServiceCollectionWriterInterface
Installation
This package must be installed within the IfCastle application environment, i.e., in
ifcastle/package-installer
, if you want the dependencies to be correctly defined.
composer require ifcastle/configurator-ini
Usage
The package defines two ini files:
- the main application configuration file:
main.ini
- the service registry:
services.ini
All files must be located in the root directory of the project.
Syntax
This package uses the ini_parse
function under the hood in data type mode
and additionally converts sections of the type [section.key] into a nested array.
Automatic replacement for ENV
variables will also work, i.e., syntax with "%":
[database] host = %DB_HOST% port = %DB_PORT% user = %DB_USER% password = %DB_PASSWORD%
See also the ini_parse function.