\MainWP\DashboardMainWP_Monitoring_Handler

Class MainWP_Monitoring_Handler

Summary

Methods
Properties
Constants
handle_settings_post()
check_to_purge_records()
handle_check_website()
get_health_noticed_status_value()
get_site_checking_status()
ajax_check_status_site()
notice_sites_uptime_monitoring()
notice_site_health_threshold()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
get_http_noticed_status_value()
get_duration_for_status()
No private properties found
N/A

Methods

handle_settings_post()

handle_settings_post() : boolean

Manage the settings post.

Returns

boolean —

True on success, false on failure.

check_to_purge_records()

check_to_purge_records() : boolean

Check to purge monitoring records.

Returns

boolean —

True for cleaning.

handle_check_website()

handle_check_website(object  $website) : array

Check a website HTTP header status.

Parameters

object $website

Object containing the website info.

Returns

array —

Check result.

get_health_noticed_status_value()

get_health_noticed_status_value(object  $website, object  $new_health) : integer

Get new site health value.

Parameters

object $website

Object containing the website info.

object $new_health

New site health value.

Returns

integer —

$noticed_value new site health status.

get_site_checking_status()

get_site_checking_status(integer  $http_code) 

Determin if site is up or down based on HTTP code.

Parameters

integer $http_code

HTTP code.

ajax_check_status_site()

ajax_check_status_site() 

Check child site status via AJAX.

notice_sites_uptime_monitoring()

notice_sites_uptime_monitoring(array  $websites, string  $admin_email, string  $email_settings, boolean  $plain_text, boolean  $to_admin = false) 

Basic site uptime monitoring.

Parameters

array $websites

Array containing the websites.

string $admin_email

Notification email.

string $email_settings

Email settings.

boolean $plain_text

Determines if the plain text format should be used.

boolean $to_admin

Send to admin or not.

notice_site_health_threshold()

notice_site_health_threshold(string  $email_settings, array  $websites, string  $email, boolean  $plain_text, boolean  $general = true, boolean  $to_admin = false) 

Site health monitoring.

Parameters

string $email_settings

Email settings.

array $websites

Array containing the websites.

string $email

Notification email.

boolean $plain_text

Determines if the plain text format should be used.

boolean $general

Determines if it's a general notification.

boolean $to_admin

Send to admin or not.

get_http_noticed_status_value()

get_http_noticed_status_value(object  $website, integer  $new_code) : integer

Get a new HTTP status notice.

Parameters

object $website

Object containing the website info.

integer $new_code

The new HTTP code value.

Returns

integer —

$noticed_value New HTTP status.

get_duration_for_status()

get_duration_for_status(object  $website, integer  $time) : integer

Computes duration status value.

Parameters

object $website

Object containing the website info.

integer $time

The current compution time.

Returns

integer —

Duration value.