本文整理汇总了PHP中backupbuddy_core::destination_send方法的典型用法代码示例。如果您正苦于以下问题:PHP backupbuddy_core::destination_send方法的具体用法?PHP backupbuddy_core::destination_send怎么用?PHP backupbuddy_core::destination_send使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类backupbuddy_core
的用法示例。
在下文中一共展示了backupbuddy_core::destination_send方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: destination_send
public function destination_send($destination_settings, $files, $send_id = '')
{
pb_backupbuddy::status('details', 'Launching destination send via cron.');
if (!class_exists('backupbuddy_core')) {
require_once pb_backupbuddy::plugin_path() . '/classes/core.php';
}
backupbuddy_core::destination_send($destination_settings, $files, $send_id);
//send_remote_destination( $destination_id, $file, $trigger = '', $send_importbuddy = false, $delete_after = false )
}
示例2: destination_send
public function destination_send($destination_settings, $files, $send_id = '', $delete_after = false, $identifier = '', $isRetry = false)
{
pb_backupbuddy::status('details', 'Beginning cron destination_send. Unique ID: `' . $identifier . '`.');
if ('' != $identifier) {
$lockFile = backupbuddy_core::getLogDirectory() . 'cronSend-' . $identifier . '.lock';
pb_backupbuddy::anti_directory_browsing(backupbuddy_core::getTempDirectory(), $die = false);
if (@file_exists($lockFile)) {
// Lock exists already. Duplicate run?
$attempts = @file_get_contents($lockFile);
$attempts++;
pb_backupbuddy::status('warning', 'Lock file exists and now shows ' . $attempts . ' attempts.');
$attempts = @file_get_contents($lockFile, $attempts);
return;
} else {
// No lock yet.
if (false === @file_put_contents($lockFile, '1')) {
pb_backupbuddy::status('warning', 'Unable to create destination send lock file `' . $lockFile . '`.');
} else {
pb_backupbuddy::status('details', 'Create destination send lock file `' . $lockFile . '`.');
}
}
}
pb_backupbuddy::status('details', 'Launching destination send via cron.');
if (!class_exists('backupbuddy_core')) {
require_once pb_backupbuddy::plugin_path() . '/classes/core.php';
}
if (true === backupbuddy_core::destination_send($destination_settings, $files, $send_id, $delete_after, $isRetry)) {
// completely finished, go ahead and clean up lock file.
/* DO not delete here as we need to keep this locked down a little longer...
if ( '' != $identifier ) {
if ( true === @unlink( $lockFile ) ) {
pb_backupbuddy::status( 'details', 'Removed destination lock file.' );
} else {
pb_backupbuddy::status( 'warning', 'Unable to remove destination lock file `' . $lockFile . '`.' );
}
}
*/
}
}