Class IDS_Init

Description

Framework initiation

This class is used for the purpose to initiate the framework and inhabits functionality to parse the needed configuration file.

Located in /Init.php (line 51)


	
			
Variable Summary
array $config
Method Summary
static object init ([string $configPath = null])
string getBasePath ()
array getConfig ()
string getConfigPath ()
void setConfig ( $config, [boolean $overwrite = false])
void setConfigPath (string $path)
array _mergeConfig (array $current, array $successor)
void __clone ()
Variables
array $config = array() (line 59)

Holds config settings

  • access: public
Methods
static method init (line 115)

Returns an instance of this class. Also a PHP version check is being performed to avoid compatibility problems with PHP < 5.1.6

  • access: public
static object init ([string $configPath = null])
  • string $configPath: the path to the config file
getBasePath (line 161)

This method checks if a base path is given and usage is set to true.

If all that tests succeed the base path will be returned as a string - else null will be returned.

  • return: the base path or null
  • access: public
string getBasePath ()
getConfig (line 220)

Returns the config array

  • return: the config array
  • access: public
array getConfig ()
getConfigPath (line 149)

Returns path to configuration file

  • return: the config path
  • access: public
string getConfigPath ()
setConfig (line 178)

Merges new settings into the exsiting ones or overwrites them

  • access: public
void setConfig ( $config, [boolean $overwrite = false])
  • array $config: the config array
  • boolean $overwrite: config overwrite flag
setConfigPath (line 132)

Sets the path to the configuration file

  • throws: Exception if file not found
  • access: public
void setConfigPath (string $path)
  • string $path: the path to the config
_mergeConfig (line 198)

Merge config hashes recursivly

The algorithm merges configuration arrays recursively. If an element is an array in both, the values will be appended. If it is a scalar in both, the value will be replaced.

  • return: Merged hash
  • access: protected
array _mergeConfig (array $current, array $successor)
  • array $current: The legacy hash
  • array $successor: The hash which values count more when in doubt
__clone (line 103)

Permitting to clone this object

For the sake of correctness of a singleton pattern, this is necessary

  • access: public
void __clone ()

Documentation generated on Mon, 22 Dec 2008 13:36:48 +0100 by phpDocumentor 1.4.2