Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brightfish-be/enhanced-ini
Read .ini files with parameter substitution
https://github.com/brightfish-be/enhanced-ini
configuration ini php
Last synced: about 14 hours ago
JSON representation
Read .ini files with parameter substitution
- Host: GitHub
- URL: https://github.com/brightfish-be/enhanced-ini
- Owner: brightfish-be
- License: mit
- Created: 2019-12-12T13:13:15.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-25T20:59:57.000Z (almost 5 years ago)
- Last Synced: 2024-04-27T01:21:00.536Z (7 months ago)
- Topics: configuration, ini, php
- Language: PHP
- Size: 24.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# enhanced-ini
[![Build Status](https://travis-ci.com/brightfish-be/enhanced-ini.svg?branch=master&style=flat-square)](https://travis-ci.com/brightfish-be/enhanced-ini)
Read .ini files with enhanced functionality:
## use of a 'default' chapter
* there is a default chapter that can be used to give default key/values for all the other chapters
* the default chapter name is `[default]` but this can be changed to e.g. `[_default]` or `[def-values]````ini
[default]
key1=1[chapter1]
// key1 will exist and = 1
key2=2
```
## {parameter} substitution* key names can be used as variables in value definition and will be substituted when the value is consulted.
* The variable syntax is `{key}` by default, but can be changed to e.g. `{$key}` or `[key]````ini
[default]
domain=www.example.com[chapter1]
code=4567
url=https://{domain}}/?code={code}
// url will be = https://www.example.com/?code=4567
```