\MainWP\DashboardMainWP_DB_Backup

Class MainWP_DB_Backup

Summary

Methods
Properties
Constants
instance()
get_option_view()
get_connected_websites()
get_disconnected_websites()
get_websites_count()
get_website_option()
get_website_options_array()
update_website_option()
get_websites_by_user_id()
get_sql_websites()
get_sql_websites_to_check_status()
get_sql_websites_by_user_id()
get_sql_websites_for_current_user()
get_websites_for_current_user()
get_sql_search_websites_for_current_user()
get_sql_where_allow_access_sites()
get_sql_where_allow_groups()
get_website_by_id()
get_sql_website_by_id()
get_websites_by_ids()
get_websites_by_group_ids()
get_websites_by_group_id()
get_sql_websites_by_group_id()
get_websites_by_group_name()
get_sql_websites_by_group_name()
get_wp_ip()
add_website()
remove_website()
update_website_values()
update_website_sync_values()
update_website()
get_websites_check_updates_count()
get_websites_count_where_dts_automatic_sync_smaller_then_start()
get_websites_last_automatic_sync()
get_websites_check_updates()
get_websites_stats_update_sql()
update_website_stats()
get_websites_by_url()
get_websites_offline_status_to_send_notice()
get_websites_to_notice_health_threshold()
get_websites_offline_check_status()
__construct()
get_my_sql_version()
get_row_result()
get_results_result()
query()
use_mysqli()
ping()
m_query()
fetch_object()
free_result()
data_seek()
fetch_array()
num_rows()
is_result()
get_website_backup_settings()
update_backup_task_progress()
add_backup_task_progress()
get_backup_task_progress()
backup_full_task_running()
remove_backup_task()
get_backup_task_by_id()
get_backup_tasks_for_user()
get_backup_tasks()
add_backup_task()
update_backup_task()
update_backup_task_with_values()
update_backup_run()
update_backup_run_manually()
update_backup_completed()
update_backup_errors()
update_completed_sites()
get_backup_tasks_to_complete()
get_backup_tasks_todo_daily()
get_backup_tasks_todo_weekly()
get_backup_tasks_todo_monthly()
No public properties found
No constants found
test_connection()
table_name()
escape()
$table_prefix
$wpdb
N/A
No private methods found
$instance
N/A

Properties

$table_prefix

$table_prefix : string

Table prefix.

Type

string

$wpdb

$wpdb : mixed

WordPress Database.

Type

mixed — WordPress Database.

$instance

$instance : \MainWP\Dashboard\(self|\MainWP\Dashboard\null)

Private static variable to hold the single instance of the class.

Type

\MainWP\Dashboard\(self|\MainWP\Dashboard\null) — Instance of MainWP_DB_Backup or null.

Methods

instance()

instance() : \MainWP\Dashboard\MainWP_DB

Method instance()

Create public static instance.

Returns

\MainWP\Dashboard\MainWP_DB

get_option_view()

get_option_view(array  $fields = array(), boolean  $default = true) : array

Get wp_options database table view.

Parameters

array $fields

Extra option fields.

boolean $default

Whether or not to get default option fields.

Returns

array —

wp_options view.

get_connected_websites()

get_connected_websites(array  $sites_ids = false) : array

Get connected child sites.

Parameters

array $sites_ids

Websites ids - option field.

Returns

array —

$connected_sites Array of connected sites.

get_disconnected_websites()

get_disconnected_websites(array  $sites_ids = false) : array

Get disconnected child sites.

Parameters

array $sites_ids

Websites ids - option field.

Returns

array —

$disc_sites Array of disonnected sites.

get_websites_count()

get_websites_count(null  $userId = null, boolean  $all_access = false) : integer

Get child site count.

Parameters

null $userId

Current user ID.

boolean $all_access

Check if user has access to all sites.

Returns

integer —

Child site count.

get_website_option()

get_website_option(array  $website, mixed  $option) : string|null

Get Child site wp_options database table.

Parameters

array $website

Child Site array.

mixed $option

Child Site wp_options table name.

Returns

string|null —

Database query result (as string), or null on failure.

get_website_options_array()

get_website_options_array(array  $website, mixed  $options) : string|null

Get child site options.

Parameters

array $website

Child site.

mixed $options

Child site options name.

Returns

string|null —

Database query result (as string), or null on failure.

update_website_option()

update_website_option(object  $website, mixed  $option, mixed  $value) 

Update child site options.

Parameters

object $website

Child site object.

mixed $option

Option to update.

mixed $value

Value to update with.

get_websites_by_user_id()

get_websites_by_user_id(integer  $userid, boolean  $selectgroups = false, null  $search_site = null, string  $orderBy = 'wp.url') : array|object|null

Get child sites by user ID.

Parameters

integer $userid

User ID.

boolean $selectgroups

Selected groups.

null $search_site

Site search field value.

string $orderBy

Order list by. Default: URL.

Returns

array|object|null —

Database query results or null on failer.

get_sql_websites()

get_sql_websites() : string

Get child sites.

Returns

string —

SQL string.

get_sql_websites_to_check_status()

get_sql_websites_to_check_status(integer  $last_check, integer  $count = 20) : string

Get child sites to run the status check process.

Parameters

integer $last_check

Time of the last check.

integer $count

Number of websites.

Returns

string —

SQL string.

get_sql_websites_by_user_id()

get_sql_websites_by_user_id(integer  $userid, boolean  $selectgroups = false, null  $search_site = null, string  $orderBy = 'wp.url', boolean  $offset = false, boolean  $rowcount = false) : object|null

Get child sites by user id via SQL.

Parameters

integer $userid

Given user ID.

boolean $selectgroups

Selected groups. Default: false.

null $search_site

Site search field value. Default: null.

string $orderBy

Order list by. Default: URL.

boolean $offset

Query offset. Default: false.

boolean $rowcount

Row count. Default: falese.

Returns

object|null —

Return database query or null on failure.

get_sql_websites_for_current_user()

get_sql_websites_for_current_user(boolean  $selectgroups = false, null  $search_site = null, string  $orderBy = 'wp.url', boolean  $offset = false, boolean  $rowcount = false, null  $extraWhere = null, boolean  $for_manager = false, mixed  $extra_view = array('favi_icon'), string  $is_staging = 'no') : object|null

Get SQL to get child sites for current user.

Parameters

boolean $selectgroups

Selected groups. Default: false.

null $search_site

Site search field value. Default: null.

string $orderBy

Order list by. Default: URL.

boolean $offset

Query offset. Default: false.

boolean $rowcount

Row count. Default: false.

null $extraWhere

Extra WHERE. Default: null.

boolean $for_manager

For role manager. Default: false.

mixed $extra_view

Extra view. Default favi_icon.

string $is_staging

yes|no Is child site a staging site.

Returns

object|null —

Database query results or null on failure.

get_websites_for_current_user()

get_websites_for_current_user(array  $params = array()) : array

Get child sites for current user.

Parameters

array $params

to get sites. Default: array().

Returns

array —

Results or null on failure.

get_sql_search_websites_for_current_user()

get_sql_search_websites_for_current_user(array  $params) : boolean|null

Get the child sites the current user has searched for.

Parameters

array $params

Query parameters.

Returns

boolean|null —

$qry Database query results or null on failure.

get_sql_where_allow_access_sites()

get_sql_where_allow_access_sites(string  $site_table_alias = '', string  $is_staging = 'no') : boolean|null

Get child sites where allowed access via SQL.

Parameters

string $site_table_alias

Child site table alias.

string $is_staging

yes|no Is child site a staging site.

Returns

boolean|null —

$_where Database query results or null on failure.

get_sql_where_allow_groups()

get_sql_where_allow_groups(string  $group_table_alias = '', string  $with_staging = 'no') : boolean|null

Get groupd where allowed access via SQL.

Parameters

string $group_table_alias

Child site table alias.

string $with_staging

yes|no Is child site a staging site.

Returns

boolean|null —

$_where Database query results or null on failer.

get_website_by_id()

get_website_by_id(integer  $id, array  $selectGroups = false, array  $fields = array()) : object|null

Get child site by id.

Parameters

integer $id

Child site ID.

array $selectGroups

Select groups.

array $fields

Get extra option fields.

Returns

object|null —

Database query results or null on failure.

get_sql_website_by_id()

get_sql_website_by_id(integer  $id, boolean  $selectGroups = false, mixed  $extra_view = array()) : object|null

Get child site by id via SQL.

Parameters

integer $id

Child site ID.

boolean $selectGroups

Selected groups.

mixed $extra_view

Extra view value.

Returns

object|null —

Database query result or null on failure.

get_websites_by_ids()

get_websites_by_ids(array  $ids, integer  $userId = null) : object|null

Method get_websites_by_ids()

Get child sites by child site IDs.

Parameters

array $ids

Child site IDs.

integer $userId

User ID.

Returns

object|null —

Database query result or null on failure.

get_websites_by_group_ids()

get_websites_by_group_ids(array  $ids, integer  $userId = null) : object|null

Get child sites by groups IDs.

Parameters

array $ids

Groups IDs.

integer $userId

User ID.

Returns

object|null —

Database query result or null on failure.

get_websites_by_group_id()

get_websites_by_group_id(integer  $id) : object|null

Get child sites by group ID.

Parameters

integer $id

Group ID.

Returns

object|null —

Database query result or null on failure.

get_sql_websites_by_group_id()

get_sql_websites_by_group_id(integer  $id, boolean  $selectgroups = false, string  $orderBy = 'wp.url', boolean  $offset = false, boolean  $rowcount = false, null  $where = null, null  $search_site = null) : object|null

Get child sites by group id via SQL.

Parameters

integer $id

Group ID.

boolean $selectgroups

Selected groups. Default: false.

string $orderBy

Order list by. Default: URL.

boolean $offset

Query offset. Default: false.

boolean $rowcount

Row count. Default: falese.

null $where

SQL WHERE value.

null $search_site

Site search field value. Default: null.

Returns

object|null —

Return database query or null on failure.

get_websites_by_group_name()

get_websites_by_group_name(integer  $userid, string  $groupname) : object|null

Get child sites by group name.

Parameters

integer $userid

Current user ID.

string $groupname

Group name.

Returns

object|null —

Database query result or null on failure.

get_sql_websites_by_group_name()

get_sql_websites_by_group_name(string  $groupname, integer  $userid = null) : object|null

Get child sites by group name.

Parameters

string $groupname

Group name.

integer $userid

Current user ID.

Returns

object|null —

Database query result or null on failure.

get_wp_ip()

get_wp_ip(integer  $wpid) : string|null

Get child site IP address.

Parameters

integer $wpid

Child site ID.

Returns

string|null —

Child site IP address or null on failure.

add_website()

add_website(integer  $userid, string  $name, string  $url, string  $admin, string  $pubkey, string  $privkey, mixed  $nossl, mixed  $nosslkey, array  $groupids, array  $groupnames, integer  $verifyCertificate = 1, string  $uniqueId = '', string  $http_user, string  $http_pass, integer  $sslVersion, integer  $wpe, integer  $isStaging) : integer|false

Add website to the MainWP Dashboard.

Parameters

integer $userid

Current user ID.

string $name

Child site name.

string $url

Child site URL.

string $admin

Child site administrator username.

string $pubkey

OpenSSL public key.

string $privkey

OpenSSL private key.

mixed $nossl

SSL suppoted connection.

mixed $nosslkey

SSL not supported connection key.

array $groupids

Group IDs.

array $groupnames

Group names.

integer $verifyCertificate

Whether or not to verify SSL Certificate.

string $uniqueId

Unique security ID.

string $http_user

HTTP Basic Authentication username.

string $http_pass

HTTP Basic Authentication password.

integer $sslVersion

SSL Version.

integer $wpe

Is it WP Engine hosted site.

integer $isStaging

Whether or not child site is staging site.

Returns

integer|false —

Child site ID or false on failure.

remove_website()

remove_website(integer  $websiteid) : integer|boolean

Remove child site from the MainWP Dashboard.

Parameters

integer $websiteid

Child site ID.

Returns

integer|boolean —

Return child site ID that was removed or false on failure.

update_website_values()

update_website_values(integer  $websiteid, array  $fields) : integer|boolean

Update child site db values.

Parameters

integer $websiteid

Child site ID.

array $fields

Database fields to update.

Returns

integer|boolean —

The number of rows updated, or false on error.

update_website_sync_values()

update_website_sync_values(integer  $websiteid, array  $fields) : integer|boolean

Update child site sync values.

Parameters

integer $websiteid

Child site ID.

array $fields

Database fields to update.

Returns

integer|boolean —

The number of rows updated, or false on error.

update_website()

update_website(integer  $websiteid, string  $url, integer  $userid, string  $name, string  $siteadmin, array  $groupids, array  $groupnames, string  $pluginDir, mixed  $maximumFileDescriptorsOverride, mixed  $maximumFileDescriptorsAuto, mixed  $maximumFileDescriptors, integer  $verifyCertificate = 1, mixed  $archiveFormat, string  $uniqueId = '', string  $http_user = null, string  $http_pass = null, integer  $sslVersion, integer  $disableChecking, integer  $checkInterval, boolean  $disableHealthChecking, integer  $healthThreshold, integer  $wpe) : boolean

Update child site.

Parameters

integer $websiteid

Website ID.

string $url

Child site URL.

integer $userid

Current user ID.

string $name

Child site name.

string $siteadmin

Child site administrator username.

array $groupids

Group IDs.

array $groupnames

Group Names.

string $pluginDir

Plugin directory.

mixed $maximumFileDescriptorsOverride

Overwrite the Maximum File Descriptors option.

mixed $maximumFileDescriptorsAuto

Auto set the Maximum File Descriptors option.

mixed $maximumFileDescriptors

Set the Maximum File Descriptors option.

integer $verifyCertificate

Whether or not to verify SSL Certificate.

mixed $archiveFormat

Backup archive formate.

string $uniqueId

Unique security ID.

string $http_user

HTTP Basic Authentication username.

string $http_pass

HTTP Basic Authentication password.

integer $sslVersion

SSL Version.

integer $disableChecking

Wether or not disable sites status checking.

integer $checkInterval

Status checking interval.

boolean $disableHealthChecking

Disable Site health threshold.

integer $healthThreshold

Site health threshold.

integer $wpe

Is it WP Engine hosted site.

Returns

boolean —

ture on success or false on failure.

get_websites_check_updates_count()

get_websites_check_updates_count(integer  $lasttime_start) : integer

Get websites check updates count.

Parameters

integer $lasttime_start

Lasttime start automatic update.

Returns

integer —

Child sites update count.

get_websites_count_where_dts_automatic_sync_smaller_then_start()

get_websites_count_where_dts_automatic_sync_smaller_then_start(integer  $lasttime_start) : integer

Get child site count where date & time Session sync is smaller then start.

Parameters

integer $lasttime_start

Last time start automatic.

Returns

integer —

Returned child site count.

get_websites_last_automatic_sync()

get_websites_last_automatic_sync() : string

Get child site last automatic sync date & time.

Returns

string —

Date and time of last automatic sync.

get_websites_check_updates()

get_websites_check_updates(integer  $limit, integer  $lasttime_start) : object|null

Get child sites check updates.

Parameters

integer $limit

Query limit.

integer $lasttime_start

Lasttime start automatic update.

Returns

object|null —

Database query result or null on failure.

get_websites_stats_update_sql()

get_websites_stats_update_sql() : object|null

Get website update stats via SQL.

Returns

object|null —

Database query result of null on failure.

update_website_stats()

update_website_stats(mixed  $websiteid, mixed  $statsUpdated) : \MainWP\Dashboard\(int|\MainWP\Dashboard\boolean)

Update child site statistics.

Update whether or not a child site has been updated.

Parameters

mixed $websiteid

Child site ID.

mixed $statsUpdated

Child site Update status.

Returns

\MainWP\Dashboard\(int|\MainWP\Dashboard\boolean) —

Number of rows effected in update or false on failure.

get_websites_by_url()

get_websites_by_url(string  $url) : object|null

Get child site by url.

Parameters

string $url

Child site URL.

Returns

object|null —

Database query result or null on failure.

get_websites_offline_status_to_send_notice()

get_websites_offline_status_to_send_notice() : array

Get websites offline status.

Returns

array —

Child site monitoring status.

get_websites_to_notice_health_threshold()

get_websites_to_notice_health_threshold(integer  $globalThreshold, integer  $count = 10) 

Method get_websites_to_notice_health_threshold()

Get websites to notice site health.

Parameters

integer $globalThreshold

Global site health threshold.

integer $count

Limit count.

get_websites_offline_check_status()

get_websites_offline_check_status() : array

Get websites offline status.

Returns

array —

Sites with offline status.

__construct()

__construct() 

MainWP_DB_Base constructor.

Run each time the class is called.

get_my_sql_version()

get_my_sql_version() : mixed

Method get_my_sql_version()

Get MySQL Version.

Returns

mixed —

MySQL vresion.

get_row_result()

get_row_result(mixed  $sql) : mixed

Method get_row_result()

Get row result.

Parameters

mixed $sql

SQL Query.

Returns

mixed —

null|Row

get_results_result()

get_results_result(mixed  $sql) : mixed

Method get_results_result()

Get Results of result.

Parameters

mixed $sql

SQL query.

Returns

mixed —

null|get_results()

query()

query(mixed  $sql) : mixed

Method query()

SQL Query.

Parameters

mixed $sql

SQL Query.

Returns

mixed —

false|$result.

use_mysqli()

use_mysqli() : boolean|self

Method use_mysqli()

Use MySQLi, Support old & new versions of WordPress (3.9+).

Returns

boolean|self —

false|$instance Instance of \mysqli

ping()

ping(mixed  $link) : mixed

Method ping()

Ping MySQLi.

Parameters

mixed $link

Query link.

Returns

mixed —

\mysqli_ping

m_query()

m_query(mixed  $query, mixed  $link) : mixed

Method m_query()

MySQLi m_query.

Parameters

mixed $query

Query params.

mixed $link

Query link.

Returns

mixed —

\mysqli_query

fetch_object()

fetch_object(mixed  $result) : boolean|mixed

Method fetch_object()

Fetch object.

Parameters

mixed $result

Query result.

Returns

boolean|mixed —

false|\mysqli_fetch_object

free_result()

free_result(mixed  $result) : boolean|mixed

Method free_result()

MySQLi free result.

Parameters

mixed $result

Query result.

Returns

boolean|mixed —

false|\mysqli_free_result

data_seek()

data_seek(mixed  $result, mixed  $offset) : boolean|mixed

Method data_seek()

MySQLi data seek.

Parameters

mixed $result

Query result.

mixed $offset

Query offset.

Returns

boolean|mixed —

false|\mysqli_data_seek

fetch_array()

fetch_array(mixed  $result, null  $result_type = null) : boolean|mixed

Method fetch_array()

MySQLi fetch array.

Parameters

mixed $result

Query result.

null $result_type

Query result type.

Returns

boolean|mixed —

false|\mysqli_fetch_array.

num_rows()

num_rows(mixed  $result) : boolean|mixed

Method num_rows()

MySQLi number of rows.

Parameters

mixed $result

Query result.

Returns

boolean|mixed —

false|\mysqli_num_rows.

is_result()

is_result(mixed  $result) : boolean|mixed

Method is_result()

Return instance of \mysqli_result

Parameters

mixed $result

Query result.

Returns

boolean|mixed —

false|\mysqli_result

get_website_backup_settings()

get_website_backup_settings(mixed  $websiteid) : object|null

Method get_website_backup_settings()

Get Child Site backup settings.

Parameters

mixed $websiteid

Child Site ID.

Returns

object|null —

Database query result for Child Site backup settings or null on failure

update_backup_task_progress()

update_backup_task_progress(mixed  $task_id, mixed  $wp_id, mixed  $values) : void

Method update_backup_task_progress()

Update backup tasuk progress.

Parameters

mixed $task_id

Task ID.

mixed $wp_id

Child Site ID.

mixed $values

Values to update.

add_backup_task_progress()

add_backup_task_progress(mixed  $task_id, mixed  $wp_id, mixed  $information) : \MainWP\Dashboard\(array|\MainWP\Dashboard\null)

Method add_backup_task_progress()

Add backup task progress.

Parameters

mixed $task_id

Task ID.

mixed $wp_id

Child Site ID.

mixed $information

Task info to add.

Returns

\MainWP\Dashboard\(array|\MainWP\Dashboard\null) —

$this->get_backup_task_progress() or null on failure

get_backup_task_progress()

get_backup_task_progress(mixed  $task_id, mixed  $wp_id) : \MainWP\Dashboard\(array|\MainWP\Dashboard\null)

Method get_backup_task_progress()

Get backup task progress.

Parameters

mixed $task_id

Task ID.

mixed $wp_id

Child Site ID.

Returns

\MainWP\Dashboard\(array|\MainWP\Dashboard\null) —

Backup Progress or null on failer.

backup_full_task_running()

backup_full_task_running(mixed  $wp_id) : boolean

Method backup_full_task_running()

Check if full backup task is running.

Parameters

mixed $wp_id

Child Site ID.

Returns

boolean —

true|false.

remove_backup_task()

remove_backup_task(mixed  $id) : void

Method remove_backup_task()

Remove backup task.

Parameters

mixed $id

Task ID.

get_backup_task_by_id()

get_backup_task_by_id(mixed  $id) : \MainWP\Dashboard\(object|\MainWP\Dashboard\null)

Method get_backup_task_by_id()

Get backup task by id.

Parameters

mixed $id

Task ID.

Returns

\MainWP\Dashboard\(object|\MainWP\Dashboard\null) —

Database query result for Backup Task or null on failure

get_backup_tasks_for_user()

get_backup_tasks_for_user(string  $orderBy = 'name') : object|null

Method get_backup_tasks_for_user()

Get backup tasks for current user.

Parameters

string $orderBy

Task order.

Returns

object|null —

Database query result for backup tasks for current user or null on failer.

get_backup_tasks()

get_backup_tasks(null  $userid = null, string  $orderBy = null) : \MainWP\Dashboard\(object|\MainWP\Dashboard\null)

Method get_backup_tasks()

Get backup tasks for current user.

Parameters

null $userid

Current user ID.

string $orderBy

Task order.

Returns

\MainWP\Dashboard\(object|\MainWP\Dashboard\null) —

Database query result for backup tasks for current user or null on failer.

add_backup_task()

add_backup_task(mixed  $userid, mixed  $name, mixed  $schedule, mixed  $type, mixed  $exclude, mixed  $sites, mixed  $groups, mixed  $subfolder, mixed  $filename, mixed  $template, mixed  $excludebackup, mixed  $excludecache, mixed  $excludenonwp, mixed  $excludezip, mixed  $archiveFormat, mixed  $maximumFileDescriptorsOverride, mixed  $maximumFileDescriptorsAuto, mixed  $maximumFileDescriptors, mixed  $loadFilesBeforeZip) : integer|false

Method add_backup_task()

Add backup task.

Parameters

mixed $userid

Current user ID.

mixed $name

Name of backup.

mixed $schedule

Backup schedual.

mixed $type

Type of backup, full|db.

mixed $exclude

Files or directories to exclude.

mixed $sites

Child Sites to backup.

mixed $groups

Groups to backup.

mixed $subfolder

Folder the backups are going into.

mixed $filename

Filename of the backups.

mixed $template

Backup template.

mixed $excludebackup

Backup files to exclude.

mixed $excludecache

Cache files to exclude.

mixed $excludenonwp

Non-wp files to exclude.

mixed $excludezip

Archives to exclude.

mixed $archiveFormat

Format to store backups in.

mixed $maximumFileDescriptorsOverride

Overide maximum file descriptors.

mixed $maximumFileDescriptorsAuto

Auto maximum file discriptors.

mixed $maximumFileDescriptors

Maximum file descriptors.

mixed $loadFilesBeforeZip

Load files before Zip.

Returns

integer|false —

The number of rows added, or false on error.

update_backup_task()

update_backup_task(mixed  $id, mixed  $userid, mixed  $name, mixed  $schedule, mixed  $type, mixed  $exclude, mixed  $sites, mixed  $groups, mixed  $subfolder, mixed  $filename, mixed  $excludebackup, mixed  $excludecache, mixed  $excludenonwp, mixed  $excludezip, mixed  $archiveFormat, mixed  $maximumFileDescriptorsOverride, mixed  $maximumFileDescriptorsAuto, mixed  $maximumFileDescriptors, mixed  $loadFilesBeforeZip) : integer|false

Method update_backup_task()

Update backup task.

Parameters

mixed $id

task id.

mixed $userid

Current user ID.

mixed $name

Name of backup.

mixed $schedule

Backup schedual.

mixed $type

Type of backup, full|db.

mixed $exclude

Files or directories to exclude.

mixed $sites

Child Sites to backup.

mixed $groups

Groups to backup.

mixed $subfolder

Folder the backups are going into.

mixed $filename

Filename of the backups.

mixed $excludebackup

Backup files to exclude.

mixed $excludecache

Cache files to exclude.

mixed $excludenonwp

Non-wp files to exclude.

mixed $excludezip

Archives to exclude.

mixed $archiveFormat

Format to store backups in.

mixed $maximumFileDescriptorsOverride

Overide maximum file descriptors.

mixed $maximumFileDescriptorsAuto

Auto maximum file discriptors.

mixed $maximumFileDescriptors

Maximum file descriptors.

mixed $loadFilesBeforeZip

Load files before Zip.

Returns

integer|false —

The number of rows updated, or false on error.

update_backup_task_with_values()

update_backup_task_with_values(mixed  $id, mixed  $values) : \MainWP\Dashboard\(int|\MainWP\Dashboard\false)

Method update_backup_task_with_values()

Update backup task with values.

Parameters

mixed $id

Task ID.

mixed $values

values to update.

Returns

\MainWP\Dashboard\(int|\MainWP\Dashboard\false) —

The number of rows updated, or false on error.

update_backup_run()

update_backup_run(mixed  $id) : integer|false

Method update_backup_run()

Update backup run.

Parameters

mixed $id

Task ID.

Returns

integer|false —

The number of rows updated, or false on error.

update_backup_run_manually()

update_backup_run_manually(mixed  $id) : integer|false

Method update_backup_run_manually()

Update backup run manually.

Parameters

mixed $id

Task ID.

Returns

integer|false —

The number of rows updated, or false on error.

update_backup_completed()

update_backup_completed(mixed  $id) : integer|false

Method update_backup_completed()

Update backup completed()

Parameters

mixed $id

Task ID.

Returns

integer|false —

The number of rows updated, or false on error.

update_backup_errors()

update_backup_errors(mixed  $id, mixed  $errors) : integer|false

Method update_backup_errors()

Update backup errors.

Parameters

mixed $id

Task ID.

mixed $errors

Backup errors.

Returns

integer|false —

The number of rows updated, or false on error.

update_completed_sites()

update_completed_sites(mixed  $id, mixed  $completedSites) : integer|false

Method update_completed_sites()

Update completed sites.

Parameters

mixed $id

Task ID.

mixed $completedSites

Completed sites.

Returns

integer|false —

The number of rows updated, or false on error.

get_backup_tasks_to_complete()

get_backup_tasks_to_complete() : object

Method get_backup_tasks_to_complete()

Get backup tasks to complete.

Returns

object —

Backup tasks.

get_backup_tasks_todo_daily()

get_backup_tasks_todo_daily() : object

Method get_backup_tasks_todo_daily()

Get daily backup tasks.

Returns

object —

Backup tasks.

get_backup_tasks_todo_weekly()

get_backup_tasks_todo_weekly() : object

Method get_backup_tasks_todo_weekly()

Get weekly backup tasks.

Returns

object —

Backup tasks.

get_backup_tasks_todo_monthly()

get_backup_tasks_todo_monthly() : object

Method get_backup_tasks_todo_monthly()

Get monthly backup tasks.

Returns

object —

Backup tasks.

test_connection()

test_connection() 

Method test_connection()

Test db connection.

table_name()

table_name(mixed  $suffix, null  $tablePrefix = null) : string

Method table_name()

Create entire table name.

Parameters

mixed $suffix

Table suffix.

null $tablePrefix

Table prefix.

Returns

string —

Table name.

escape()

escape(mixed  $data) : mixed

Method escape()

Escape SQL Data.

Parameters

mixed $data

Data to escape.

Returns

mixed —

Escapped SQL Data.