KOW Config

Library for loading and handling configuration files in the KOW Framework.

Currently it supports:

  • System Paths for loading configuration in more than on location
  • Multiple configuration file format (Plain Text and XML)
  • Methods for retrieving both string, numeric and boolean data
  • Configuration keys can have default value when missing
  • Configuration file is divided into sections for easier use
  • Support for arrays of sections

In order to use KOW Config you'll need an instance of the currently supported parsers.

Multiple or single parser?

There has been some thought on what's best: to have a single parser implementation or to allow the user to implement his own parser. The initial KOW Config implementation was designed with multiple parsers in mind. It worked great at first but then it got quite complex to support new features.

Some of the features required rewriting a big portion of code in the parsers. And this actually got in the way in several levels. Other issue is the way the main class handles parser interfaces - which can lead to memory leak depending on how it's used.

So in time we started noticing some advantages in having only one configuration file format, and the chosen one is the one described by kowconfig-text module.

There is a new branch in the git repository called v2.0_proposals that address this change.