Gumbo_Interface_Config_Reader
Config Reader Interface
A Config Reader is responsible for reading a particular type of configuration file into memory, and returning the details in a Composite form. The class should indicate what type of file it is responsible for reading. This will a allow the programmer to define various types of Readers.
In order to apply a Config Reader to Library, simply create a new class inside the '/gumbo/config/reader/*' directory. The class name should be defined as 'Gumbo_Config_Reader_[type]' where 'type' is the type of configuration file it will be responsible for reading. For example, supplied with the Library is a Gumbo_Config_Reader_Ini class. This class will read INI files into memory. The Config Type does not have to be a file format.
The only requirement is to return a Composite object. This will provide a common interface for other systems to use. Please refer to the Composite Package for more details.
Author(s): |
Michael Luster <mluster79@yahoo.com> |
License: | New BSD License |
Copyright: | Copyright (c) 2007, iBayou, Michael Luster |
Link: | http://sourceforge.net/projects/phpgumbo |
Version: | 0.0.1 |
Interface Methods
Reads given config file into a Composite
Parameter(s):
- (string) $file :: file to read (full path)
- precondition:
file_exists($file)
[ Top ]