Class Config

Description

Load and save configuration files

This class currently supports the following config file formats:

  • .INI
This class can be used by any module as follows:-
  • $this->exec_module_action('Config', 'read_ini_file', $filename);
  • $this->exec_module_action('Config', 'write_ini_file', $filename, $config);

Located in /modules/Config.php (line 13)

Module
   |
   --Config
Method Summary
array read_ini_file (string $filename)
bool write_ini_file (string $filename, array $config)
Variables
Methods
read_ini_file (line 24)

This method reads configuration values in the specified filename.

This method uses the PHP function parse_ini_file() to load the configuration. It always processes sections.

  • return: An associative array with the configuration
array read_ini_file (string $filename)
  • string $filename: Name of the file
write_ini_file (line 39)

This method writes the configuration values specified to the filename.

The file data is overwritten if the file already exists. Implementation obtained from the comments under the parse_ini_file() page on PHP.net.

  • return: Returns true on success, false otherwise
bool write_ini_file (string $filename, array $config)
  • string $filename: Name of the file
  • array $config: Associative array with the configuration

Inherited Methods

Inherited From Module

Module::disable_render()
Module::disable_template_library()
Module::disable_view()
Module::enable_render()
Module::enable_template_library()
Module::enable_view()
Module::exec_module_action()
Module::get_error_strings()
Module::get_exceptions()
Module::get_queries()
Module::get_templating_library_paths()
Module::initialize()
Module::PHPTAL_render()
Module::register_error()
Module::register_exception()
Module::register_query()
Module::render()
Module::set_references()
Module::set_template_file()
Module::Smarty_render()

Documentation generated on Sat, 23 Jun 2007 21:28:18 -0500 by phpDocumentor 1.3.2