@@ -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)); |
@@ -122,6 +122,9 @@ discard block |
||
| 122 | 122 | return $this->start_filesystem->normalizeFileInfo($info); |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | + /** |
|
| 126 | + * @param string $file |
|
| 127 | + */ |
|
| 125 | 128 | public function get_storage_path_file_info($file) |
| 126 | 129 | { |
| 127 | 130 | return $this->getMetadataFull('storage_adapter', $file); |
@@ -188,6 +191,9 @@ discard block |
||
| 188 | 191 | return $total; |
| 189 | 192 | } |
| 190 | 193 | |
| 194 | + /** |
|
| 195 | + * @param string $backup_name |
|
| 196 | + */ |
|
| 191 | 197 | public function is_part($backup_name) |
| 192 | 198 | { |
| 193 | 199 | if(stristr($backup_name, "-part")) |
@@ -578,6 +584,9 @@ discard block |
||
| 578 | 584 | |
| 579 | 585 | } |
| 580 | 586 | |
| 587 | + /** |
|
| 588 | + * @param string $tmp_file |
|
| 589 | + */ |
|
| 581 | 590 | public function estimate_reading_time($tmp_file) |
| 582 | 591 | { |
| 583 | 592 | $this->logger->debug(sprintf(("Estimating file system reading time"))); |
@@ -616,6 +625,9 @@ discard block |
||
| 616 | 625 | return $name; |
| 617 | 626 | } |
| 618 | 627 | |
| 628 | + /** |
|
| 629 | + * @param string $field |
|
| 630 | + */ |
|
| 619 | 631 | public function sort_by( &$array, $field, $direction = 'asc') |
| 620 | 632 | { |
| 621 | 633 | if(strtolower($direction) == "desc" || $direction == SORT_DESC) |
@@ -175,6 +175,9 @@ |
||
| 175 | 175 | return $wpdb->prefix; |
| 176 | 176 | } |
| 177 | 177 | |
| 178 | + /** |
|
| 179 | + * @param string $option |
|
| 180 | + */ |
|
| 178 | 181 | public function get_xcloner_option($option) |
| 179 | 182 | { |
| 180 | 183 | $data = get_option($option); |
@@ -86,6 +86,9 @@ |
||
| 86 | 86 | return ftell($fp); |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | + /** |
|
| 90 | + * @param string $filename |
|
| 91 | + */ |
|
| 89 | 92 | private function curl_file_create($filename, $mimetype = '', $postname = '') { |
| 90 | 93 | if (!function_exists('curl_file_create')) { |
| 91 | 94 | |
@@ -45,8 +45,6 @@ |
||
| 45 | 45 | * Initialize the class and set its properties. |
| 46 | 46 | * |
| 47 | 47 | * @since 1.0.0 |
| 48 | - * @param string $plugin_name The name of this plugin. |
|
| 49 | - * @param string $version The version of this plugin. |
|
| 50 | 48 | */ |
| 51 | 49 | public function __construct( Xcloner $xcloner_container) { |
| 52 | 50 | |
@@ -49,6 +49,11 @@ discard block |
||
| 49 | 49 | * Rename backup archive |
| 50 | 50 | * |
| 51 | 51 | */ |
| 52 | + |
|
| 53 | + /** |
|
| 54 | + * @param string $old_name |
|
| 55 | + * @param string $new_name |
|
| 56 | + */ |
|
| 52 | 57 | public function rename_archive($old_name, $new_name) |
| 53 | 58 | { |
| 54 | 59 | $this->logger->info(sprintf("Renaming backup archive %s to %s", $old_name, $new_name)); |
@@ -113,6 +118,10 @@ discard block |
||
| 113 | 118 | * Send notification error by E-Mail |
| 114 | 119 | * |
| 115 | 120 | */ |
| 121 | + |
|
| 122 | + /** |
|
| 123 | + * @param string $error_message |
|
| 124 | + */ |
|
| 116 | 125 | public function send_notification_error($to, $from, $subject, $backup_name, $params, $error_message) |
| 117 | 126 | { |
| 118 | 127 | |
@@ -137,6 +146,11 @@ discard block |
||
| 137 | 146 | * Send backup archive notfication by E-Mail |
| 138 | 147 | * |
| 139 | 148 | */ |
| 149 | + |
|
| 150 | + /** |
|
| 151 | + * @param string $from |
|
| 152 | + * @param string $subject |
|
| 153 | + */ |
|
| 140 | 154 | public function send_notification($to, $from, $subject, $backup_name, $params, $error_message="", $additional = array()) |
| 141 | 155 | { |
| 142 | 156 | if(!$from) |
@@ -215,6 +229,10 @@ discard block |
||
| 215 | 229 | * Incremental Backup method |
| 216 | 230 | * |
| 217 | 231 | */ |
| 232 | + |
|
| 233 | + /** |
|
| 234 | + * @param integer $init |
|
| 235 | + */ |
|
| 218 | 236 | public function start_incremental_backup($backup_params, $extra_params, $init) |
| 219 | 237 | { |
| 220 | 238 | $return = array(); |
@@ -438,6 +456,10 @@ discard block |
||
| 438 | 456 | * Write multipart file components |
| 439 | 457 | * |
| 440 | 458 | */ |
| 459 | + |
|
| 460 | + /** |
|
| 461 | + * @param string $path |
|
| 462 | + */ |
|
| 441 | 463 | private function write_multipart_file($path) |
| 442 | 464 | { |
| 443 | 465 | $path = $this->get_archive_name_with_extension(); |
@@ -497,6 +519,10 @@ discard block |
||
| 497 | 519 | * Add file to archive |
| 498 | 520 | * |
| 499 | 521 | */ |
| 522 | + |
|
| 523 | + /** |
|
| 524 | + * @param integer $append |
|
| 525 | + */ |
|
| 500 | 526 | public function add_file_to_archive($file_info, $start_at_byte, $byte_limit = 0, $append, $filesystem) |
| 501 | 527 | { |
| 502 | 528 | |
@@ -198,6 +198,9 @@ |
||
| 198 | 198 | } |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | + /** |
|
| 202 | + * @param string $storage_type |
|
| 203 | + */ |
|
| 201 | 204 | public function verify_filesystem($storage_type) |
| 202 | 205 | { |
| 203 | 206 | $method = "get_".$storage_type."_filesystem"; |
@@ -44,8 +44,6 @@ |
||
| 44 | 44 | * Initialize the class and set its properties. |
| 45 | 45 | * |
| 46 | 46 | * @since 1.0.0 |
| 47 | - * @param string $plugin_name The name of the plugin. |
|
| 48 | - * @param string $version The version of this plugin. |
|
| 49 | 47 | */ |
| 50 | 48 | public function __construct( Xcloner $xcloner_container ) { |
| 51 | 49 | |