PHP Classes

Config: Get config values from INI files XPath style

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
Not enough user ratingsTotal: 1,118 All time: 3,367 This week: 455Up
Version License PHP version Categories
mickious_config 1.0MIT/X Consortium ...5PHP 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: 47
All time rank: 116931 in The Netherlands The Netherlands
Week rank: 164 Up5 in The Netherlands The Netherlands Up

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

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:1,118
This week:0
All time:3,367
This week:455Up