OWAB - Online Web Application Builder Class Set

CONFIGTOOL (v. 0.02)

This class is meant to read configuration information from the external text file.
Configuration information is placed in the text file with normal format as name-value pairs. With this class you can read and use configuration variables with object reference, modify key value pairs and save modified object back to the file. Class supports commenting with your favourite marks. Only alphabetically started key names will be used as a configuration variables. Class can use automatic key type conversion (AKTC) to set configuration variables to the native data types of php.

Class can also be used to read language specific information to your application. Please see more from example files and documentation how to use (or modify) this class.


This package (at: http://www.hmv-systems.fi/marko/ConfigTool/ConfigTool.zip) includes the following files and directories:

ReadMe.txt - Textual format of ReadMe file.

index.html - Actually you are reading it now!


Config_definitions.txt - Tells you how to write configuration files
that are compatible with ConfigTool class.

ConfigTool.php - Main class with full of comments. Include this to your applications.

Documentation for the developers and simplified documentation for the end user are made with phpDocumentator.

Examples package. Example configuration files and example ConfigTool usage files (simple_example.php, advanced_example.php, form_example.php), are meant to demonstrate, how to use configTool. There is also one example, how to use language files with ConfigTool on your applications.

Whole package off class, docs and examples are zipped to the one file.


If you somehow want to take a look at it...


Althought specific documentation is included with this class, class is fairly simple to use. Here you find simple example, how to get started without reading the documentation:

// include the class with proper relative path
include( "path/to/class/ConfigTool.php" );
// make object
$conf = new ConfigTool();
// get configuration information from the text file
// any relative path can be used
$conf->setConfigFromFile( "path/to/file/config.txt" );
// now it's up to you... echo value of the key,
// that you have defined on the config.txt
echo "Hello1 = " . $conf->your_key_name;

See more advanced examples from the examples directory.


Class and examples are distributed under the GPL, so you can modify them freely to your need. Since i'm developing this class betweenwhiles, i'd be glad to hear from you, if you use it on your scripts and applications, or find some retouching suggestions or even bugs on it.

Some of the ideas to this class are from freely distributed ConfigReader class. But as class doesn't relay on it, or connects to it very loosely, i have prefered to show only web reference to it. See copyright at: http://www.thewebmasters.net/php/ConfigReader.phtml

Thera are also some other projects on the world, that goes side by side with ConfigTool. If you are interested, take a look at:


This is almost same like ConfigTool! But i've never seen it but after i made my own. :) Still some new features in ConfigTool version 0.02 are derived from that class.



Marko Manninen
6.5.2004, Kajaani

mob: +358 44 2927529
email: marko.manninen@hmv-systems.fi
web: http://www.hmv-systems.fi/marko/ConfigTool/