phpBB API Documentation
Class

phpbb\install\helper\file_updater\compression_file_updater

class compression_file_updater implements file_updater_interface

File updater for generating archive with updated files

Methods

__construct(update_helper $update_helper, string $phpbb_root_path, string $php_ext)

Constructor

string init(string $method)

Set the compression method

close()

Close archive writing process

delete_file(string $path_to_file)

Deletes a file

create_new_file(string $path_to_file_to_create, string $source, bool $create_from_content = false)

Creates a new file

update_file(string $path_to_file_to_update, string $source, bool $create_from_content = false)

Update file

string get_method_name()

Returns the name of the file updater method

Details

at line 50
public __construct(update_helper $update_helper, string $phpbb_root_path, string $php_ext)

Constructor

Parameters

update_helper $update_helper
string $phpbb_root_path
string $php_ext

at line 65
public string init(string $method)

Set the compression method

Parameters

string $method Compression method's file extension

Return Value

string Archive's filename

at line 87
public close()

Close archive writing process

at line 95
public delete_file(string $path_to_file)

Deletes a file

Parameters

string $path_to_file Path to the file to delete

at line 105
public create_new_file(string $path_to_file_to_create, string $source, bool $create_from_content = false)

Creates a new file

Parameters

string $path_to_file_to_create Path to the new file's location
string $source Path to file to copy or string with the new file's content
bool $create_from_content Whether or not to use $source as the content, false by default

at line 120
public update_file(string $path_to_file_to_update, string $source, bool $create_from_content = false)

Update file

Parameters

string $path_to_file_to_update Path to the file's location
string $source Path to file to copy or string with the new file's content
bool $create_from_content Whether or not to use $source as the content, false by default

at line 129
public string get_method_name()

Returns the name of the file updater method

Return Value

string