\MainWP\DashboardMainWP_Backup_Handler

Class MainWP_Backup_Handler

Summary

Methods
Properties
Constants
get_class_name()
backup_site()
backup_download_file()
backup_delete_file()
backup_check_pid()
backup()
is_archive()
is_sql_file()
is_sql_archive()
get_current_archive_extension()
get_real_extension()
handle_settings_post()
backup_get_file_size()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

get_class_name()

get_class_name() : string

Method get_class_name()

Get Class Name.

Returns

string —

CLASS

backup_download_file()

backup_download_file(mixed  $pSiteId, mixed  $pType, mixed  $pUrl, mixed  $pFile) : boolean

Method backup_download_file()

Download backup file.

Parameters

mixed $pSiteId

Child Site ID.

mixed $pType

full|db Type of backup.

mixed $pUrl

Backup location.

mixed $pFile

Backup File.

Throws

\MainWP\Dashboard\MainWP_Exception

Error message.

Returns

boolean —

true|false

backup_delete_file()

backup_delete_file(mixed  $pSiteId, mixed  $pFile) : boolean

Method backup_delete_file().

Delete backup file.

Parameters

mixed $pSiteId

Child Site ID.

mixed $pFile

File to delete.

Returns

boolean —

true

backup_check_pid()

backup_check_pid(mixed  $pSiteId, mixed  $pid, mixed  $type, mixed  $subfolder, mixed  $pFilename) : array

Method backup_check_pid()

Check backup pid.

Parameters

mixed $pSiteId

Child Site id.

mixed $pid

Backup pid.

mixed $type

full|db Type of backup.

mixed $subfolder

Sub folder for backup.

mixed $pFilename

Backups filename.

Throws

\Exception

Error message.

Returns

array —

$status, $result.

backup()

backup(mixed  $pSiteId, mixed  $pType, mixed  $pSubfolder, mixed  $pExclude, mixed  $excludebackup, mixed  $excludecache, mixed  $excludenonwp, mixed  $excludezip, null  $pFilename = null, string  $pFileNameUID = '', boolean  $pArchiveFormat = false, boolean  $pMaximumFileDescriptorsOverride = false, boolean  $pMaximumFileDescriptorsAuto = false, boolean  $pMaximumFileDescriptors = false, boolean  $pLoadFilesBeforeZip = false, boolean  $pid = false, boolean  $append = false) : mixed

Method backup()

Backup Child Site.

Parameters

mixed $pSiteId

Child Site ID.

mixed $pType

full|db Typ of backup.

mixed $pSubfolder

Sub folder to store backup.

mixed $pExclude

Exclusion list.

mixed $excludebackup

Exclude backup files.

mixed $excludecache

Exclude cache files.

mixed $excludenonwp

Exclude no WP Files.

mixed $excludezip

Exclude Zip files.

null $pFilename

Name of backup file.

string $pFileNameUID

File name unique ID.

boolean $pArchiveFormat

Archive format.

boolean $pMaximumFileDescriptorsOverride

Override maximum file descriptors.

boolean $pMaximumFileDescriptorsAuto

Auto maximum file descriptors.

boolean $pMaximumFileDescriptors

Maximum file descriptors.

boolean $pLoadFilesBeforeZip

Load files before zip.

boolean $pid

Backup pid.

boolean $append

Append to backup.

Throws

\MainWP\Dashboard\MainWP_Exception

Error message.

Returns

mixed —

$backup_result

is_archive()

is_archive(mixed  $pFileName, string  $pPrefix = '', string  $pSuffix = '') : mixed

Method is_archive()

Check if Archive.

Parameters

mixed $pFileName

File to check.

string $pPrefix

File prefix.

string $pSuffix

File suffix.

Returns

mixed —

Files that are archives.

is_sql_file()

is_sql_file(mixed  $pFileName) : mixed

Method is_sql_file()

Check if file is SQL.

Parameters

mixed $pFileName

File to check.

Returns

mixed —

SQL Files.

is_sql_archive()

is_sql_archive(mixed  $pFileName) : mixed

Method is_sql_archive()

Check if is SQL Archive.

Parameters

mixed $pFileName

File to check.

Returns

mixed —

SQL archive.

get_current_archive_extension()

get_current_archive_extension(boolean  $website = false, boolean|string  $task = false) : mixed

Method get_current_archive_extension()

Get extension of current Archive.

Parameters

boolean $website

true|false.

boolean|string $task

true|false|global|site.

Returns

mixed —

$archiveFormat Format of Archive.

get_real_extension()

get_real_extension(mixed  $path) : mixed

Method get_real_extension()

Get full file extension.

Parameters

mixed $path

Path to file.

Returns

mixed —

$check|pathinfo()

handle_settings_post()

handle_settings_post() : boolean

Method handle_settings_post()

Update Child Site Settings.

Returns

boolean —

true|false

backup_get_file_size()

backup_get_file_size(mixed  $pFile) : false|integer

Method backup_get_file_size()

Get file size.

Parameters

mixed $pFile

Backup file.

Returns

false|integer