abstract class base_extractor implements extractor_interface

Abstract base class for database extraction

Properties

protected temp $temp
protected request_interface $request
protected driver_interface $db
protected bool $download
protected bool $store
protected int $time
protected string $format
protected resource $fp
protected string $write
protected string $close
protected bool $run_comp
protected bool $is_initialized

Methods

__construct(temp $temp, request_interface $request, driver_interface $db)

Constructor

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

Start the extraction of the database

null
write_end()

Closes file and/or dumps download data

null
flush(string $data)

Writes data to file/download content

Details

at line 91
__construct(temp $temp, request_interface $request, driver_interface $db)

Constructor

Parameters

temp $temp
request_interface $request
driver_interface $db

at line 104
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

at line 183
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()

at line 212
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()