Login   Register  
PHP Classes
elePHPant
Icontem

Config: Get config values from INI files XPath style

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2009-01-21 (5 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 1,049 This week: 1All time: 3,284 This week: 1,188Up
Version License PHP version Categories  
mickious_config 1.0MIT/X Consortium License5PHP 5, Files and Folders, Configuration
Description Author  

This class can be used to retrieve configuration values from INI files in XPath style.

It can open an INI format file given a path that includes the base name, section and setting that you want retrieve.

The class parses the file and returns the specified setting value.

The singleton pattern is used to keep a cache of previously parsed INI files in case multiple setting values need to be retrieved.

Example:
$conf = Config::singelton('myconf.ini');
$setting = $conf->getSetting('myconf/email/cc');

Picture of M.C. van der Most van Spijk
Name: M.C. van der Most van ... <contact>
Classes: 2 packages by
Country: The Netherlands The Netherlands
Age: 37
All time rank: 109233 in The Netherlands The Netherlands
Week rank: 679 Up22 in The Netherlands The Netherlands Up

  Files folder image Files  
File Role Description
Plain text file Config.class.php Class Config class
Accessible without login Plain text file example.php Example Example of use

 Version Control Unique User Downloads Download Rankings  
 0%Total:1,049All time:3,284
 This week:1This week:1,188Up