phpBB API Documentation
Class

phpbb\config_php_file

class config_php_file

Methods

__construct(string $phpbb_root_path, string $php_ext)

Constructor

set_config_file(string $config_file)

Set the path to the config file.

array get_all()

Returns an associative array containing the variables defined by the config file.

mixed get(string $variable)

Return the value of a variable defined into the config.php file or null if the variable does not exist.

string convert_30_dbms_to_31(string $dbms)

Convert either 3.0 dbms or 3.1 db driver class name to 3.1 db driver class name.

Details

at line 53
public __construct(string $phpbb_root_path, string $php_ext)

Constructor

Parameters

string $phpbb_root_path phpBB Root Path
string $php_ext php file extension

at line 65
public set_config_file(string $config_file)

Set the path to the config file.

Parameters

string $config_file

at line 76
public array get_all()

Returns an associative array containing the variables defined by the config file.

Return Value

array Return the content of the config file or an empty array if the file does not exists.

at line 89
public mixed get(string $variable)

Return the value of a variable defined into the config.php file or null if the variable does not exist.

Parameters

string $variable The name of the variable

Return Value

mixed Value of the variable or null if the variable is not defined.

at line 125
public string convert_30_dbms_to_31(string $dbms)

Convert either 3.0 dbms or 3.1 db driver class name to 3.1 db driver class name.

If $dbms is a valid 3.1 db driver class name, returns it unchanged. Otherwise prepends phpbb\db\driver\ to the dbms to convert a 3.0 dbms to 3.1 db driver class name.

Parameters

string $dbms dbms parameter

Return Value

string driver class

Exceptions

RuntimeException