PHP Classes

pConfig: Manage hierarchical configuration files

Recommend this page to a friend!
  Info   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 938 All time: 3,817 This week: 89Up
Version License Categories
pconfig 1.0Free for non-comm...PHP 5, Files and Folders, Configuration


This class can be used to create and manage hierarchical configuration files.

The configuration is defined as a tree of unlimited depth on which the nodes may contain any type of values.

The class read and write the configuration to files. The class supports writing configuration files in a protected mode, which consists of generating a PHP script file that does not output anything if it is executed when it is directly accessible via the Web server. This way it does not exposes the information stored in the configuration file.

The class also supports writing configuration files in a synchronized mode, on which each change to configuration tree is automatically saved to the configurator file.

The class may also store comments to help other people understanding the data that is stored.

The generated configuration files are automatically indented according to the depth of the nodes.

Picture of Guilherme Blanco
Name: Guilherme Blanco <contact>
Classes: 5 packages by
Country: Brazil Brazil
Age: 40
All time rank: 22815 in Brazil Brazil
Week rank: 346 Down25 in Brazil Brazil Down
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Files folder imagedocs (3 files)
Plain text file class.pConfig.php Class Full Class Source
Accessible without login Plain text file config_generated.ini.php Output Generated Output
Accessible without login Plain text file test_config.php Example First Test
Accessible without login Plain text file test_config2.php Example Second Test

  Files folder image Files  /  docs  
File Role Description
  Accessible without login HTML file pConfig.html Doc. pConfig API
  Accessible without login HTML file pConfig_INDEX.html Doc. pConfig INDEX
  Accessible without login Plain text file stylesheet.css Data CSS Definitions 10KB
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
pTree Download .zip .tar.gz Used to manage Tree Structure Required
 Version Control Unique User Downloads Download Rankings  
This week:0
All time:3,817
This week:89Up
User Comments (1)
14 years ago (kishore kumar)