1 | <?php |
||
15 | class DBFactory { |
||
16 | /** |
||
17 | * Create a new database for index at path. |
||
18 | * |
||
19 | * @param string $path |
||
20 | * @throws \RuntimeException if database already exists. |
||
21 | * @return IndexDB |
||
22 | */ |
||
23 | 1 | public function build_index_db($path) { |
|
33 | |||
34 | /** |
||
35 | * Check if an index database exists. |
||
36 | * |
||
37 | * @param string $path |
||
38 | * @return bool |
||
39 | */ |
||
40 | 4 | public function index_db_exists($path) { |
|
43 | |||
44 | /** |
||
45 | * Load existing index database. |
||
46 | * |
||
47 | * @param string $path |
||
48 | * @throws \RuntimeException if file does not exist |
||
49 | * @return IndexDB |
||
50 | */ |
||
51 | 2 | public function load_index_db($path) { |
|
60 | |||
61 | /** |
||
62 | * Get a database for results. |
||
63 | * |
||
64 | * @param string $path |
||
65 | * @return ResultDB |
||
66 | */ |
||
67 | 5 | public function get_result_db($path) { |
|
73 | |||
74 | 6 | protected function build_connection($path) { |
|
84 | } |
||
85 |