Axiom (v1.2.0)

A lightweight PHP framework
axIniConfiguration Class Reference

INI Configuration file parser. More...

+ Inheritance diagram for axIniConfiguration:

Public Member Functions

 __construct ($file, $section, $cache_dir=false)
 Constructor.
 __get ($key)
 getIterator ()

Data Fields

const CACHE_FILE = "config.cache.php"

Protected Member Functions

 _generateTree ($section)
 Generates the tree structure using the INI structure.
 _cache ()
 Put current configuration tree in cache for later use.

Protected Attributes

 $_file
 Configuration file path.
 $_section
 Configuration section.
 $_cache_dir
 Cache directory (false if cache is disabled)
 $_tree
 INI Tree structure.

Detailed Description

INI Configuration file parser.

Todo:
axIniConfiguration class description
Author:
Delespierre
License:
http://www.gnu.org/licenses/lgpl.html Lesser General Public Licence version 3

Definition at line 16 of file axIniConfiguration.class.php.


Constructor & Destructor Documentation

axIniConfiguration::__construct ( file,
section,
cache_dir = false 
)

Constructor.

Note:
If the $cache_dir isn't valid, the cache will be silently disabled
Parameters:
string$fileThe INI file path to parse
string$sectionThe section to be used
string$cache_dir[optional] [default false] The directory for caching (or false if cache is disabled)

Reimplemented from axConfiguration.

Definition at line 55 of file axIniConfiguration.class.php.


Member Function Documentation

Parameter getter.

All configuration item should be accessible through the -> operator

Parameters:
string$keyThe parameter's name
Returns:
axConfiguration

Reimplemented from axConfiguration.

Definition at line 64 of file axIniConfiguration.class.php.

axIniConfiguration::_cache ( ) [protected]

Put current configuration tree in cache for later use.

Does nothing if the cache is disabled.

Returns:
boolean

Definition at line 126 of file axIniConfiguration.class.php.

axIniConfiguration::_generateTree ( section) [protected]

Generates the tree structure using the INI structure.

Parameters:
string$sectionThe section to use
Exceptions:
RuntimeExceptionIf the file cannot be parsed
Returns:
void

Definition at line 92 of file axIniConfiguration.class.php.


Field Documentation

string axIniConfiguration::$_cache_dir [protected]

Cache directory (false if cache is disabled)

Definition at line 40 of file axIniConfiguration.class.php.

string axIniConfiguration::$_file [protected]

Configuration file path.

Definition at line 28 of file axIniConfiguration.class.php.

string axIniConfiguration::$_section [protected]

Configuration section.

Definition at line 34 of file axIniConfiguration.class.php.

axConfigurationItem axIniConfiguration::$_tree [protected]

INI Tree structure.

Definition at line 46 of file axIniConfiguration.class.php.

const axIniConfiguration::CACHE_FILE = "config.cache.php"

Definition at line 22 of file axIniConfiguration.class.php.


The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables