phpBB API Documentation
Class

phpbb\db\extractor\mysql_extractor

class mysql_extractor extends base_extractor

Methods

__construct(string $phpbb_root_path, request_interface $request, driver_interface $db)

Constructor

from base_extractor
null init_extractor(string $format, string $filename, int $time, bool $download = false, bool $store = false)

Start the extraction of the database

from base_extractor
null write_end()

Closes file and/or dumps download data

from base_extractor
null flush(string $data)

Writes data to file/download content

from base_extractor
null write_start($table_prefix)

Writes header comments to the database backup

null write_table($table_name)

Extracts database table structure

null write_data($table_name)

Extracts data from database table

Details

in base_extractor at line 91
public __construct(string $phpbb_root_path, request_interface $request, driver_interface $db)

Constructor

Parameters

string $phpbb_root_path
request_interface $request
driver_interface $db

in base_extractor at line 104
public null init_extractor(string $format, string $filename, int $time, bool $download = false, bool $store = false)

Start the extraction of the database

This function initialize the database extraction. It is required to call this function before calling any other extractor functions.

Parameters

string $format
string $filename
int $time
bool $download
bool $store

Return Value

null

Exceptions

invalid_format_exception when $format is invalid

in base_extractor at line 183
public null write_end()

Closes file and/or dumps download data

Return Value

null

Exceptions

extractor_not_initialized_exception when calling this function before init_extractor()

in base_extractor at line 212
public null flush(string $data)

Writes data to file/download content

Parameters

string $data

Return Value

null

Exceptions

extractor_not_initialized_exception when calling this function before init_extractor()

at line 23
public null write_start($table_prefix)

Writes header comments to the database backup

Parameters

$table_prefix

Return Value

null

Exceptions

extractor_not_initialized_exception when calling this function before init_extractor()

at line 41
public null write_table($table_name)

Extracts database table structure

Parameters

$table_name

Return Value

null

Exceptions

extractor_not_initialized_exception when calling this function before init_extractor()

at line 75
public null write_data($table_name)

Extracts data from database table

Parameters

$table_name

Return Value

null

Exceptions

extractor_not_initialized_exception when calling this function before init_extractor()