PHP Classes

Simple YAML Config Reader: Read configuration settings from YAML files

Recommend this page to a friend!
  Info   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 1,068 All time: 3,474 This week: 213Up
Version License PHP version Categories
yamlconfig 1.0.0GNU General Publi...5.0PHP 5, Configuration
Description 

Author

This package can be used to read configuration settings from file YAML format.

It uses a separate class named SPYC, written by Chris Wanstrath, to parse YAML configuration files and returns an associative array with pairs of configuration options and the respective values.

The configuration class uses the singleton pattern, so a configuration file is loaded and parsed only once per script.

It automatic switches between configuration files depending on the machine the script is running.

It also checks the request query string for language parameter and automatically loads the contents of the relevant localization file into a global variable for easier use.

Picture of Chavo
Name: Chavo <contact>
Classes: 1 package by
Country: Bulgaria Bulgaria
Age: 45
All time rank: 227417 in Bulgaria Bulgaria
Week rank: 569 Up5 in Bulgaria Bulgaria Up

  Files folder image Files  
File Role Description
Plain text file settings.class.php Class Main Class
Accessible without login Plain text file localhost.yml Data Sample configuration file
Accessible without login Plain text file example.php Example Example script
Plain text file spyc.php Class YAML parser class
Accessible without login Plain text file en.yml Data Sample localization file
Accessible without login Plain text file fr.yml Data Sample localization file
Accessible without login Plain text file readme.txt Doc. Readme file

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,068
This week:0
All time:3,474
This week:213Up
User Comments (1)
Really useful class, but your code needs to be better and per...
9 years ago (Andoitz Jordan Marmolejo)
72%StarStarStarStar