◆ __construct()
__construct |
( |
|
$config_path = NULL | ) |
|
#- Constructs a new config file class.
- Parameters
-
string | $config_path | (optional) path to the config files |
◆ _set_config_var()
_set_config_var |
( |
& |
$container, |
|
|
|
$var_name, |
|
|
|
$var_value, |
|
|
|
$booleanize |
|
) |
| |
#+ @access private
- Parameters
-
array | &$container | |
string | $var_name | |
mixed | $var_value | |
boolean | $booleanize | determines whether $var_value is converted to to true/false |
◆ _trigger_error_msg()
_trigger_error_msg |
( |
|
$error_msg, |
|
|
|
$error_type = E_USER_WARNING |
|
) |
| |
@uses trigger_error() creates a PHP warning/error
- Parameters
-
string | $error_msg | |
integer | $error_type | one of |
◆ clear()
clear |
( |
|
$file_name = NULL | ) |
|
Clear loaded config data for a certain file or all files.
- Parameters
-
string | $file_name | file to clear config data for |
◆ get()
get |
( |
|
$file_name, |
|
|
|
$section_name = NULL , |
|
|
|
$var_name = NULL |
|
) |
| |
Retrieves config info based on the file, section, and variable name.
- Parameters
-
string | $file_name | config file to get info for |
string | $section_name | (optional) section to get info for |
string | $var_name | (optional) variable to get info for |
- Returns
- string|array a value or array of values
◆ get_file_names()
Get all loaded config file names.
- Returns
- array an array of loaded config file names
◆ get_key()
Retrieves config info based on the key.
- Parameters
-
$file_name | string config key (filename/section/var) |
- Returns
- string|array same as get() @uses get() retrieves information from config file and returns it
◆ get_section_names()
get_section_names |
( |
|
$file_name | ) |
|
Get all section names from a loaded file.
- Parameters
-
string | $file_name | config file to get section names from |
- Returns
- array an array of section names from the specified file
◆ get_var_names()
get_var_names |
( |
|
$file_name, |
|
|
|
$section = NULL |
|
) |
| |
Get all global or section variable names.
- Parameters
-
string | $file_name | config file to get info for |
string | $section_name | (optional) section to get info for |
- Returns
- array an array of variables names from the specified file/section
◆ load_file()
load_file |
( |
|
$file_name, |
|
|
|
$prepend_path = true |
|
) |
| |
Load a configuration file manually.
- Parameters
-
string | $file_name | file name to load |
boolean | $prepend_path | whether current config path should be prepended to the filename |
◆ parse_contents()
parse_contents |
( |
|
$contents | ) |
|
parse the source of a configuration file manually.
- Parameters
-
string | $contents | the file-contents to parse |
◆ set_file_contents()
set_file_contents |
( |
|
$config_file, |
|
|
|
$contents |
|
) |
| |
Store the contents of a file manually.
- Parameters
-
string | $config_file | file name of the related contents |
string | $contents | the file-contents to parse |
◆ set_path()
Set the path where configuration files can be found.
- Parameters
-
string | $config_path | path to the config files |
◆ $_config_data
◆ $_config_path
◆ $booleanize
Controls whether config values of on/true/yes and off/false/no get converted to boolean values automatically.
◆ $fix_newlines
Controls whether or not to fix mac or dos formatted newlines. If set to true, \r or \r
will be changed to
.
◆ $overwrite
Controls whether variables with the same name overwrite each other.
◆ $read_hidden
Controls whether hidden config sections/vars are read from the file.
The documentation for this class was generated from the following file: