PHP Class monitor_robot

ファイルを表示 Open project: HeadTalker/uptime-robot Class Usage Examples

Public Methods

Method Description
charts ( array $monitor_response ) Create charts with response time data
monitor_curl ( ) : boolean Check if curl is installed.
monitor_endpoint ( string $UP_ACCOUNT_API_KEY ) : array Set the API endpoint for uptime robot
monitor_response_data ( $monitor_response_data ) : array Monitor Response Data Timestamps and values
monitor_status ( integer $status ) : string Monitor Status Name
monitor_table_body ( array $monitor_data ) Prints out the table body in the datatables with relevant info
monitor_type ( integer $type ) : string Monitor Type Name
past_incidents ( $monitor_response ) Past Incidents

Private Methods

Method Description
log_type ( integer $type ) : string Log Type Name

Method Details

charts() public method

Create charts with response time data
public charts ( array $monitor_response )
$monitor_response array Monitor data

monitor_curl() public method

Check if curl is installed.
public monitor_curl ( ) : boolean
return boolean true | false Returns true if CURL is installed. | Returns false if CURL is NOT installed.

monitor_endpoint() public method

Set the API endpoint for uptime robot
public monitor_endpoint ( string $UP_ACCOUNT_API_KEY ) : array
$UP_ACCOUNT_API_KEY string Your uptime robot api key
return array $monitor_response Decoded json response from the API

monitor_response_data() public method

Monitor Response Data Timestamps and values
public monitor_response_data ( $monitor_response_data ) : array
return array $data Array of timestamps and array of values

monitor_status() public method

Monitor Status Name
public monitor_status ( integer $status ) : string
$status integer The monitor status number value
return string $status_name The monitor string name

monitor_table_body() public method

Prints out the table body in the datatables with relevant info
public monitor_table_body ( array $monitor_data )
$monitor_data array Monitor Data

monitor_type() public method

Monitor Type Name
public monitor_type ( integer $type ) : string
$type integer The monitor type number value
return string $monitor_name The monitor string name

past_incidents() public method

Past Incidents
public past_incidents ( $monitor_response )