PHP Classes

Config Tool: Read and write configuration text files

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 68%Total: 4,708 All time: 593 This week: 69Up
Version License PHP version Categories
configtool 1.0.0GNU Lesser Genera...3Files and Folders, Configuration
Description 

Author

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.

The class can use automatic key type conversion (AKTC) to set configuration variables to the native data types of php.

The 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.

Picture of Marko Tapio Manninen
Name: Marko Tapio Manninen <contact>
Classes: 3 packages by
Country: Finland Finland
Age: 49
All time rank: 3432 in Finland Finland
Week rank: 178 Up1 in Finland Finland Up

Details

********************************************************************************************* 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. ********************************************************************************************* INCLUDED FILES This package (at: http://www.hmv-systems.fi/marko/ConfigTool/ConfigTool.zip) includes the following files and directories: ReadMe.txt Actually you are reading it now! index.html HTML-format of ReadMe file License.txt GNU LESSER GENERAL PUBLIC LICENSE. Config_definitions.txt Tells you, how to write config files, that are compatible with ConfigTool class. ConfigTool.php Main class. Include this to your applications. ./docs/ Directory. Includes documentation for the class developer and simplified documentation to the end user. Use the one, that fits to your need. ./examples/ Directory. Includes example configuration file and examples (simple_example.php, advanced_example.php, form_example.php) how to use it. There is also one example, how to use language files with ConfigTool on your applications. VERSION 0.01 If you somehow want to take a look at it: http://www.hmv-systems.fi/marko/ConfigTool/v001/ ********************************************************************************************* QUICK START 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: <?php // 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 $conf->your_key_name; ?> See more advanced examples from the examples directory. ********************************************************************************************* FINAL NOTES 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: http://wiki.ciaweb.net/yawiki/index.php?area=Yawp http://www.phpclasses.org/browse/package/508.html : 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. http://www.phpclasses.org/browse/package/93.html http://www.php-tools.de/site.php?&file=patConfiguration/overview.xml Marko Manninen 6.5.2004, Kajaani mob: +358 44 2927529 email: marko.manninen@hmv-systems.fi web: http://www.hmv-systems.fi/marko/ConfigTool/

  Files folder image Files (7)  
File Role Description
Accessible without login Plain text file advanced_example.php Example Example2 how to use the class
Plain text file ConfigTool.php Class Main class
Accessible without login Plain text file Config_definitions.txt Doc. Configuration format and description
Accessible without login Plain text file example_config_file.txt Conf. Example configuration file
Accessible without login HTML file index.html Doc. ReadMe in HTML format
Accessible without login Plain text file ReadMe.txt Doc. Instructions
Accessible without login Plain text file simple_example.php Example Example1 how to use class

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:4,708
This week:0
All time:593
This week:69Up
 User Ratings  
 
 All time
Utility:87%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:81%StarStarStarStarStar
Examples:83%StarStarStarStarStar
Tests:-
Videos:-
Overall:68%StarStarStarStar
Rank:386