Gumbo_Config
Config Class
The Config Class will perform necessary operations defined by the Config Interface. Each operation will have a method assigned to it (read). The client will call the method, passing the necessary arguments. The class uses a Factory to search for the appropriate Config Operation (Reader).
This will make the Config class universal to any changes made to the Config Package. The Factory will search inside the Config directory. It will setup the proper operation ('reader','writer',...) and the type of operation class. If it's found, the operation will be performed and the results returned.
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 |
Implements interfaces:
Class Methods
Returns an instantiated Config Operation
This method is primarily used internally. It will return a Config Operation class based on the 'type'. It works specifically on Gumbo defined Config Operations. The class name is automatically generated based on the arguments.
The first argument 'name' will be the type of Config operation interface to load ('reader','writer',...).
The second argument 'args' will be a string determining what type of operation class to find ('ini','php',...). This isn't restricted to a file type, but to a defined Config Operation Class. The type name could be 'foo', and it would load the 'Gumbo_Config_[Reader]_Foo' class (if calling for a 'Reader' operation).
Parameter(s):
- (string) $name :: configuration interface
- (string) $args :: type of configuration interface class
- throws:
Gumbo_Exception
[ Top ]Reads the configuration file and returns the values
Parameter(s):
- (string) $file :: file to load (full path)
- (string) $type :: type of configuration file
- see:
Gumbo_Interface_Composite - throws:
Gumbo_Exception Implementation of:
[ Top ]public bool write ( $tree, string $file, [string $type], [bool $replace] ) [line 150]Writes a configuration file
Parameter(s):
- (Gumbo_Interface_Composite) $tree :: data to write
- (string) $file :: file name (full path)
- (string) $type :: type of configuration file
- (bool) $replace :: replaces the current file
- return:
if operation was successful - see:
Gumbo_Interface_Composite - throws:
Gumbo_Exception Implementation of:
[ Top ]