Config_Loader_File __construct(
string
$file
)
|
|
Loads the configuration file and parses it. Ater construction object is ready for use (calls to get_conf_value() method)
Parameters:
|
string |
$file: |
- full path to fconfiguration file |
Redefinition of:
- Config_Loader::__construct()
- It is supposed loading of the configuration from external resource as file or DB to be performed at construction time of Config_Loader objects.
void import_file(
$file,
$config_dir
)
|
|
Parameters:
API Tags:
boolean load_file(
$string
$file
)
|
|
Loads
Parameters:
API Tags:
| Return: | - returns file contents as array one element per row |
| Access: | private |
void parse_command_line(
string
$line,
$line_no
)
|
|
Parses line that contains command, e.g. starting with "!"
Parameters:
API Tags:
array parse_conf_arr(
unknown_type
$conf_arr
)
|
|
Parses array returned by $this->parse_file_arr. Populates $this->pairs.
Parameters:
API Tags:
| Return: | simple associative array that may be used (and it is used in __construct) for setting $this->pairs |
| Access: | private |
array parse_file_arr(
array
$file_arr
)
|
|
Parses array loaded by $this->load_file(). Skips rows that are commets or missformed (i.e. starting with blank space)
Parameters:
API Tags:
| Return: | simple associative array that contain just "valid" rows |
| Access: | private |