\MainWP\Dashboard\Module\ApiBackupsApi_Backups_Helper

Class Api_Backups_Utility

Summary

Methods
Properties
Constants
get_instance()
__construct()
get_website_by_id()
update_website_option()
get_website_options()
fetch_object()
free_result()
security_nonce()
$instance
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$instance

$instance : mixed

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

Type

mixed — Default null

Methods

__construct()

__construct() 

Construct.

get_website_by_id()

get_website_by_id(integer  $website_id, boolean  $selectGroups = false, array  $extra_view = array()) : object|null

Get sites by website ID.

Parameters

integer $website_id

User ID.

boolean $selectGroups

Select groups.

array $extra_view

get extra option fields.

Returns

object|null —

Database query results or null on failure.

update_website_option()

update_website_option(object|integer  $website, string  $opt_name, string  $opt_value) 

Method update_website_option().

Update the website option.

Parameters

object|integer $website

website object or ID.

string $opt_name

website.

string $opt_value

website.

get_website_options()

get_website_options(object|integer  $website, string|array  $options) 

Method get_website_options().

Get the website options.

Parameters

object|integer $website

website object or ID.

string|array $options

Options name.

fetch_object()

fetch_object(mixed  $websites) : mixed

Method fetch_object().

Handle fetch object db.

Parameters

mixed $websites

websites results.

Returns

mixed —

results.

free_result()

free_result(mixed  $results) : mixed

Method free_result().

Handle fetch result db.

Parameters

mixed $results

websites results.

Returns

mixed —

results.

security_nonce()

security_nonce(string  $action) 

Method security_nonce().

Handle security nonce.

Parameters

string $action

security action.