EC-CUBE
Public メソッド | 変数
クラス Config_File

Public メソッド

 Config_File ($config_path=NULL)
 set_path ($config_path)
 get ($file_name, $section_name=NULL, $var_name=NULL)
get_key ($config_key)
 get_file_names ()
 get_section_names ($file_name)
 get_var_names ($file_name, $section=NULL)
 clear ($file_name=NULL)
 load_file ($file_name, $prepend_path=true)
 set_file_contents ($config_file, $contents)
 parse_contents ($contents)
 _set_config_var (&$container, $var_name, $var_value, $booleanize)
 _trigger_error_msg ($error_msg, $error_type=E_USER_WARNING)

変数

 $overwrite = true
 $booleanize = true
 $read_hidden = true
 $fix_newlines = true
 $_config_path = ""
 $_config_data = array()

関数

_set_config_var ( &$  container,
var_name,
var_value,
booleanize 
)

#@+ private

引数:
array&$container
string$var_name
mixed$var_value
boolean$booleanizedetermines whether $var_value is converted to to true/false
_trigger_error_msg ( error_msg,
error_type = E_USER_WARNING 
)

trigger_error() creates a PHP warning/error

引数:
string$error_msg
integer$error_typeone of
clear ( file_name = NULL)

Clear loaded config data for a certain file or all files.

引数:
string$file_namefile to clear config data for
Config_File ( config_path = NULL)

#@- Constructs a new config file class.

引数:
string$config_path(optional) path to the config files
get ( file_name,
section_name = NULL,
var_name = NULL 
)

Retrieves config info based on the file, section, and variable name.

引数:
string$file_nameconfig file to get info for
string$section_name(optional) section to get info for
string$var_name(optional) variable to get info for
戻り値:
string|array a value or array of values

Get all loaded config file names.

戻り値:
array an array of loaded config file names
& get_key ( config_key)

Retrieves config info based on the key.

引数:
$file_namestring config key (filename/section/var)
戻り値:
string|array same as get() get() retrieves information from config file and returns it
get_section_names ( file_name)

Get all section names from a loaded file.

引数:
string$file_nameconfig file to get section names from
戻り値:
array an array of section names from the specified file
get_var_names ( file_name,
section = NULL 
)

Get all global or section variable names.

引数:
string$file_nameconfig file to get info for
string$section_name(optional) section to get info for
戻り値:
array an array of variables names from the specified file/section
load_file ( file_name,
prepend_path = true 
)

Load a configuration file manually.

引数:
string$file_namefile name to load
boolean$prepend_pathwhether current config path should be prepended to the filename
parse_contents ( contents)

parse the source of a configuration file manually.

引数:
string$contentsthe file-contents to parse
set_file_contents ( config_file,
contents 
)

Store the contents of a file manually.

引数:
string$config_filefile name of the related contents
string$contentsthe file-contents to parse
set_path ( config_path)

Set the path where configuration files can be found.

引数:
string$config_pathpath to the config files

構造体

$_config_path = ""

#@- private

$booleanize = true

Controls whether config values of on/true/yes and off/false/no get converted to boolean values automatically.

$fix_newlines = true

Controls whether or not to fix mac or dos formatted newlines. If set to true, or
will be changed to
.

$overwrite = true

Controls whether variables with the same name overwrite each other.

$read_hidden = true

Controls whether hidden config sections/vars are read from the file.


このクラスの説明は次のファイルから生成されました:
 全て データ構造 ネームスペース 関数 変数