@@ -469,6 +469,11 @@ |
||
469 | 469 | * handler $fd - file handler where to write the records |
470 | 470 | * @return |
471 | 471 | */ |
472 | + |
|
473 | + /** |
|
474 | + * @param integer $start |
|
475 | + * @param integer $limit |
|
476 | + */ |
|
472 | 477 | public function export_table($databaseName, $tableName, $start, $limit, $dumpfile) |
473 | 478 | { |
474 | 479 | $this->logger->debug(sprintf(("Exporting table %s.%s data"), $databaseName, $tableName)); |
@@ -87,6 +87,9 @@ |
||
87 | 87 | return ftell($fp); |
88 | 88 | } |
89 | 89 | |
90 | + /** |
|
91 | + * @param string $filename |
|
92 | + */ |
|
90 | 93 | function curl_file_create($filename, $mimetype = '', $postname = '') { |
91 | 94 | if (!function_exists('curl_file_create')) { |
92 | 95 |
@@ -142,6 +142,9 @@ |
||
142 | 142 | |
143 | 143 | } |
144 | 144 | |
145 | + /** |
|
146 | + * @param string $storage_type |
|
147 | + */ |
|
145 | 148 | public function verify_filesystem($storage_type) |
146 | 149 | { |
147 | 150 | $method = "get_".$storage_type."_filesystem"; |
@@ -187,6 +187,9 @@ discard block |
||
187 | 187 | return $total; |
188 | 188 | } |
189 | 189 | |
190 | + /** |
|
191 | + * @param string $backup_name |
|
192 | + */ |
|
190 | 193 | public function is_part($backup_name) |
191 | 194 | { |
192 | 195 | if(stristr($backup_name, "-part")) |
@@ -577,6 +580,9 @@ discard block |
||
577 | 580 | |
578 | 581 | } |
579 | 582 | |
583 | + /** |
|
584 | + * @param string $tmp_file |
|
585 | + */ |
|
580 | 586 | public function estimate_reading_time($tmp_file) |
581 | 587 | { |
582 | 588 | $this->logger->debug(sprintf(("Estimating file system reading time"))); |
@@ -615,6 +621,9 @@ discard block |
||
615 | 621 | return $name; |
616 | 622 | } |
617 | 623 | |
624 | + /** |
|
625 | + * @param string $field |
|
626 | + */ |
|
618 | 627 | public function sort_by( &$array, $field, $direction = 'asc') |
619 | 628 | { |
620 | 629 | if(strtolower($direction) == "desc" || $direction == SORT_DESC) |
@@ -45,6 +45,11 @@ discard block |
||
45 | 45 | * Rename backup archive |
46 | 46 | * |
47 | 47 | */ |
48 | + |
|
49 | + /** |
|
50 | + * @param string $old_name |
|
51 | + * @param string $new_name |
|
52 | + */ |
|
48 | 53 | public function rename_archive($old_name, $new_name) |
49 | 54 | { |
50 | 55 | $this->logger->info(sprintf("Renaming backup archive %s to %s", $old_name, $new_name)); |
@@ -109,6 +114,10 @@ discard block |
||
109 | 114 | * Send notification error by E-Mail |
110 | 115 | * |
111 | 116 | */ |
117 | + |
|
118 | + /** |
|
119 | + * @param string $error_message |
|
120 | + */ |
|
112 | 121 | public function send_notification_error($to, $from, $subject, $backup_name, $params, $error_message) |
113 | 122 | { |
114 | 123 | |
@@ -133,6 +142,11 @@ discard block |
||
133 | 142 | * Send backup archive notfication by E-Mail |
134 | 143 | * |
135 | 144 | */ |
145 | + |
|
146 | + /** |
|
147 | + * @param string $from |
|
148 | + * @param string $subject |
|
149 | + */ |
|
136 | 150 | public function send_notification($to, $from, $subject, $backup_name, $params, $error_message="") |
137 | 151 | { |
138 | 152 | if(!$from) |
@@ -205,6 +219,10 @@ discard block |
||
205 | 219 | * Incremental Backup method |
206 | 220 | * |
207 | 221 | */ |
222 | + |
|
223 | + /** |
|
224 | + * @param integer $init |
|
225 | + */ |
|
208 | 226 | public function start_incremental_backup($backup_params, $extra_params, $init) |
209 | 227 | { |
210 | 228 | $return = array(); |
@@ -413,6 +431,10 @@ discard block |
||
413 | 431 | * Write multipart file components |
414 | 432 | * |
415 | 433 | */ |
434 | + |
|
435 | + /** |
|
436 | + * @param string $path |
|
437 | + */ |
|
416 | 438 | private function write_multipart_file($path) |
417 | 439 | { |
418 | 440 | $path = $this->get_archive_name_with_extension(); |
@@ -472,6 +494,10 @@ discard block |
||
472 | 494 | * Add file to archive |
473 | 495 | * |
474 | 496 | */ |
497 | + |
|
498 | + /** |
|
499 | + * @param integer $append |
|
500 | + */ |
|
475 | 501 | public function add_file_to_archive($file_info, $start_at_byte, $byte_limit = 0, $append, $filesystem) |
476 | 502 | { |
477 | 503 |
@@ -39,6 +39,9 @@ discard block |
||
39 | 39 | return $path; |
40 | 40 | } |
41 | 41 | |
42 | + /** |
|
43 | + * @return string |
|
44 | + */ |
|
42 | 45 | public function get_xcloner_store_path() |
43 | 46 | { |
44 | 47 | if(!get_option('xcloner_store_path') or !is_dir(get_option('xcloner_store_path'))) |
@@ -175,6 +178,9 @@ discard block |
||
175 | 178 | return $wpdb->prefix; |
176 | 179 | } |
177 | 180 | |
181 | + /** |
|
182 | + * @param string $option |
|
183 | + */ |
|
178 | 184 | public function get_xcloner_option($option) |
179 | 185 | { |
180 | 186 | $data = get_option($option); |