phpBB API Documentation
Class

phpbb\install\helper\config

class config

Stores common settings and installation status

Methods

__construct(filesystem_interface $filesystem, IniGetWrapper $php_ini, $phpbb_root_path)

Constructor

mixed get($param_name, $default = false)

Returns data for a specified parameter

set($param_name, $value)

Sets a parameter in installer_config

mixed system_get(string $param_name)

Returns system parameter

int get_time_remaining()

Returns remaining time until the run time limit

int get_memory_remaining()

Returns remaining memory available for PHP

set_finished_task(int $task_service_index)

Saves the latest executed task

set_active_module(string $module_service_name, int $module_service_index)

Set active module

array get_progress_data()

Getter for progress data

load_config()

Recovers install configuration from file

create_progress_restart_point(string $name)

Creates a progress restart point

bool jump_to_restart_point(string $name)

Set restart point to continue from

bool has_restart_point(string $name)

Returns whether a restart point with a given name exists or not

save_config()

Dumps install configuration to disk

increment_current_task_progress(int $increment_by = 1)

Increments the task progress

set_current_task_progress(int $task_progress)

Sets the task progress to a specific number

set_task_progress_count(int $task_progress_count)

Sets the number of tasks belonging to the installer in the current mode.

int get_current_task_progress()

Returns the number of the current task being executed

int get_task_progress_count()

Returns the number of tasks belonging to the installer in the current mode.

set_finished_navigation_stage(array $nav_path)

Marks stage as completed in the navigation bar

set_active_navigation_stage(array $nav_path)

Marks stage as active in the navigation bar

array get_navigation_data()

Returns navigation data

clean_up_config_file()

Removes install config file

Details

at line 86
public __construct(filesystem_interface $filesystem, IniGetWrapper $php_ini, $phpbb_root_path)

Constructor

Parameters

filesystem_interface $filesystem
IniGetWrapper $php_ini
$phpbb_root_path

at line 122
public mixed get($param_name, $default = false)

Returns data for a specified parameter

Parameters

$param_name
$default

Return Value

mixed value of the specified parameter or the default value if the data cannot be recovered.

at line 133
public set($param_name, $value)

Sets a parameter in installer_config

Parameters

$param_name
$value

at line 147
public mixed system_get(string $param_name)

Returns system parameter

Parameters

string $param_name Name of the parameter

Return Value

mixed Returns system parameter if it is defined, false otherwise

at line 157
public int get_time_remaining()

Returns remaining time until the run time limit

Return Value

int Remaining time until the run time limit in seconds

at line 172
public int get_memory_remaining()

Returns remaining memory available for PHP

Return Value

int Remaining memory until reaching the limit

at line 193
public set_finished_task(int $task_service_index)

Saves the latest executed task

Parameters

int $task_service_index Index of the installer task service in the module

at line 204
public set_active_module(string $module_service_name, int $module_service_index)

Set active module

Parameters

string $module_service_name Name of the installer module service
int $module_service_index Index of the installer module service

at line 215
public array get_progress_data()

Getter for progress data

Return Value

array

at line 223
public load_config()

Recovers install configuration from file

at line 259
public create_progress_restart_point(string $name)

Creates a progress restart point

Restart points can be used to repeat certain tasks periodically. You need to call this method from the first task you want to repeat.

Parameters

string $name Name of the restart point

at line 274
public bool jump_to_restart_point(string $name)

Set restart point to continue from

Parameters

string $name Name of the restart point

Return Value

bool Returns false if the restart point name does not exist, otherwise true

at line 296
public bool has_restart_point(string $name)

Returns whether a restart point with a given name exists or not

Parameters

string $name Name of the restart point

Return Value

bool

at line 304
public save_config()

Dumps install configuration to disk

at line 340
public increment_current_task_progress(int $increment_by = 1)

Increments the task progress

Parameters

int $increment_by The amount to increment by

at line 355
public set_current_task_progress(int $task_progress)

Sets the task progress to a specific number

Parameters

int $task_progress The task progress number to be set

at line 365
public set_task_progress_count(int $task_progress_count)

Sets the number of tasks belonging to the installer in the current mode.

Parameters

int $task_progress_count Number of tasks

at line 375
public int get_current_task_progress()

Returns the number of the current task being executed

Return Value

int

at line 385
public int get_task_progress_count()

Returns the number of tasks belonging to the installer in the current mode.

Return Value

int

at line 395
public set_finished_navigation_stage(array $nav_path)

Marks stage as completed in the navigation bar

Parameters

array $nav_path Array to the navigation elem

at line 410
public set_active_navigation_stage(array $nav_path)

Marks stage as active in the navigation bar

Parameters

array $nav_path Array to the navigation elem

at line 420
public array get_navigation_data()

Returns navigation data

Return Value

array

at line 428
public clean_up_config_file()

Removes install config file