blob: ff45df9bb7c20f98b12e9170708970e2e1eaf023 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
namespace phpbb\db\extractor;
/**
* Database extractor interface
*/
interface extractor_interface
{
/**
* 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.
*
* @param string $format
* @param string $filename
* @param int $time
* @param bool $download
* @param bool $store
* @return null
* @throws \phpbb\db\extractor\exception\invalid_format_exception when $format is invalid
*/
public function init_extractor($format, $filename, $time, $download = false, $store = false);
/**
* Writes header comments to the database backup
*
* @param string $table_prefix prefix of phpBB database tables
* @return null
* @throws \phpbb\db\extractor\exception\extractor_not_initialized_exception when calling this function before init_extractor()
*/
public function write_start($table_prefix);
/**
* Closes file and/or dumps download data
*
* @return null
* @throws \phpbb\db\extractor\exception\extractor_not_initialized_exception when calling this function before init_extractor()
*/
public function write_end();
/**
* Extracts database table structure
*
* @param string $table_name name of the database table
* @return null
* @throws \phpbb\db\extractor\exception\extractor_not_initialized_exception when calling this function before init_extractor()
*/
public function write_table($table_name);
/**
* Extracts data from database table
*
* @param string $table_name name of the database table
* @return null
* @throws \phpbb\db\extractor\exception\extractor_not_initialized_exception when calling this function before init_extractor()
*/
public function write_data($table_name);
/**
* Writes data to file/download content
*
* @param string $data
* @return null
* @throws \phpbb\db\extractor\exception\extractor_not_initialized_exception when calling this function before init_extractor()
*/
public function flush($data);
}
|