MainWP_Client_Report_Base
in package
Class MainWP_Client_Report_Base
MainWP Client Reports extension handler, extened by the MainWP_Client_Report class.
Table of Contents
Properties
- $date_from : int
- Static variable to hold date from.
- $date_to : int
- Static variable to hold date to.
- $instance : mixed
- Public static variable to hold the single instance of the class.
Methods
- get_class_name() : string
- Method get_class_name()
- get_compatible_action() : string
- Get compatible action by context.
- get_compatible_context() : string
- Convert context name of tokens to context name saved in child reports.
- get_connector_by_compatible_context() : string
- Get connector by compatible context.
- get_other_tokens_data() : array<string|int, mixed>
- Get the other tokens data.
- get_section_loop_data() : array<string|int, mixed>
- Get the section loop data.
- get_section_loop_records() : array<string|int, mixed>
- Get the section loop records.
- get_section_token_value() : array<string|int, mixed>
- Get the section token value.
- get_stream_get_params() : array<string|int, mixed>
- Get the Stream parameters.
- get_stream_meta_data() : string
- Get the Stream meta data for a certain record.
- get_stream_others_tokens() : array<string|int, mixed>
- Get the Stream other tokens.
- get_stream_sections_data() : array<string|int, mixed>
- Get the Stream sections data.
- instance() : mixed
- Public static variable to hold the single instance of the class.
- is_backup_action() : bool
- Check if it's backup action.
- ithemes_get_lockouts() : array<string|int, mixed>
- Shows all lockouts currently in the database.
- ithemes_query_events_count() : array<string|int, mixed>
- Method ithemes_getEventsCount()
- wfc_getblockedcount() : array<string|int, mixed>
- Method wfc_getblockedcount()
- wfc_getissuecount() : array<string|int, mixed>
- Method wfc_getissuecount()
- get_author_data_token_value() : string
- Get the author data token value.
- get_mainwp_maintenance_token_value() : string
- Get the Maintanence token value.
- get_other_tokens_count() : int
- Get the other tokens count.
- get_result_data_token_value() : string
- Get the result data token value.
- get_section_loop_token_values() : array<string|int, mixed>
- Get the section loop token values.
- get_stream_get_not_in_params() : bool
- Get the Stream excluded parameters.
- get_sucuri_scan_token_value() : string
- Get the Sucuri scan token value.
Properties
$date_from
Static variable to hold date from.
public
static int
$date_from
= null
.
$date_to
Static variable to hold date to.
public
static int
$date_to
= null
.
$instance
Public static variable to hold the single instance of the class.
public
static mixed
$instance
= null
Default null
Methods
get_class_name()
Method get_class_name()
public
static get_class_name() : string
Get class name.
Return values
string —CLASS Class name.
get_compatible_action()
Get compatible action by context.
public
get_compatible_action(string $action[, string $context = '' ]) : string
Parameters
- $action : string
-
Action name as reference.
- $context : string = ''
-
Context name as reference.
Return values
string —$action Compatible action.
get_compatible_context()
Convert context name of tokens to context name saved in child reports.
public
get_compatible_context(string $context) : string
Parameters
- $context : string
-
Context name to be converted.
Return values
string —$context Converted context name.
get_connector_by_compatible_context()
Get connector by compatible context.
public
get_connector_by_compatible_context(string $context) : string
Parameters
- $context : string
-
Context name as reference.
Return values
string —$connector Required connector.
get_other_tokens_data()
Get the other tokens data.
public
get_other_tokens_data(array<string|int, mixed> $records, array<string|int, mixed> $tokens, array<string|int, mixed> &$skip_records) : array<string|int, mixed>
Parameters
- $records : array<string|int, mixed>
-
An array containg actions records.
- $tokens : array<string|int, mixed>
-
An array containg the tokens list.
- $skip_records : array<string|int, mixed>
-
An array containg records to skip.
Return values
array<string|int, mixed> —An array containg the tokens values.
get_section_loop_data()
Get the section loop data.
public
get_section_loop_data(object $records, array<string|int, mixed> $tokens, string $section[, array<string|int, mixed> $skip_records = array() ]) : array<string|int, mixed>
Parameters
- $records : object
-
Object containng reports records.
- $tokens : array<string|int, mixed>
-
An array containing report tokens.
- $section : string
-
Section name.
- $skip_records : array<string|int, mixed> = array()
-
Records to skip.
Return values
array<string|int, mixed> —Section loop records.
get_section_loop_records()
Get the section loop records.
public
get_section_loop_records(object $records, array<string|int, mixed> $tokens, string $connector, string $context, string $action, array<string|int, mixed> $skip_records) : array<string|int, mixed>
Parameters
- $records : object
-
Object containng reports records.
- $tokens : array<string|int, mixed>
-
An array containing report tokens.
- $connector : string
-
Record connector.
- $context : string
-
Record context.
- $action : string
-
Record action.
- $skip_records : array<string|int, mixed>
-
Records to skip.
Return values
array<string|int, mixed> —Loops.
get_section_token_value()
Get the section token value.
public
get_section_token_value(object $record, string $data, string $context, string $token) : array<string|int, mixed>
Parameters
- $record : object
-
Object containing the record data.
- $data : string
-
Data to process.
- $context : string
-
Record context.
- $token : string
-
Requested token.
Tags
Return values
array<string|int, mixed> —Token value.
get_stream_get_params()
Get the Stream parameters.
public
get_stream_get_params(array<string|int, mixed> $other_tokens, array<string|int, mixed> $sections) : array<string|int, mixed>
Parameters
- $other_tokens : array<string|int, mixed>
-
An array containing other tokens.
- $sections : array<string|int, mixed>
-
An array containing sections.
Tags
Return values
array<string|int, mixed> —Arguments array.
get_stream_meta_data()
Get the Stream meta data for a certain record.
public
get_stream_meta_data(object $record, string $data) : string
Parameters
- $record : object
-
Object containing the record data.
- $data : string
-
Data to process.
Return values
string —Return the meta data value.
get_stream_others_tokens()
Get the Stream other tokens.
public
get_stream_others_tokens(array<string|int, mixed> $records, array<string|int, mixed> $other_tokens, array<string|int, mixed> $skip_records) : array<string|int, mixed>
Parameters
- $records : array<string|int, mixed>
-
An array containg actions records.
- $other_tokens : array<string|int, mixed>
-
An array containing other tokens.
- $skip_records : array<string|int, mixed>
-
An array containing skipped records.
Return values
array<string|int, mixed> —Other tokens data.
get_stream_sections_data()
Get the Stream sections data.
public
get_stream_sections_data(array<string|int, mixed> $records, array<string|int, mixed> $sections, array<string|int, mixed> $skip_records) : array<string|int, mixed>
Parameters
- $records : array<string|int, mixed>
-
An array containg actions records.
- $sections : array<string|int, mixed>
-
An array containing sections.
- $skip_records : array<string|int, mixed>
-
An array containing skipped records.
Return values
array<string|int, mixed> —Sections data.
instance()
Public static variable to hold the single instance of the class.
public
static instance() : mixed
is_backup_action()
Check if it's backup action.
public
is_backup_action(string $action) : bool
Parameters
- $action : string
-
Record action.
Return values
bool —If backup action, return trie, if not, false.
ithemes_get_lockouts()
Shows all lockouts currently in the database.
public
ithemes_get_lockouts([string $type = 'all' ][, array<string|int, mixed> $args = array() ]) : array<string|int, mixed>
Parameters
- $type : string = 'all'
-
'all', 'host', 'user' or 'username'.
- $args : array<string|int, mixed> = array()
-
Additional arguments.
Tags
Return values
array<string|int, mixed> —all lockouts in the system
ithemes_query_events_count()
Method ithemes_getEventsCount()
public
ithemes_query_events_count([string $event = 'blocked' ]) : array<string|int, mixed>
Get the number of Events.
Parameters
- $event : string = 'blocked'
-
event to count.
Return values
array<string|int, mixed> —Action result.
wfc_getblockedcount()
Method wfc_getblockedcount()
public
wfc_getblockedcount([string $grouping = null ]) : array<string|int, mixed>
Get the number of blocked attackes.
Parameters
- $grouping : string = null
-
Contains the grouping blocked attacks to count blocked attacks.
Return values
array<string|int, mixed> —Action result.
wfc_getissuecount()
Method wfc_getissuecount()
public
wfc_getissuecount() : array<string|int, mixed>
Get the issues found in most recent scan.
Return values
array<string|int, mixed> —Action result.
get_author_data_token_value()
Get the author data token value.
private
get_author_data_token_value(object $record, string $connector, string $context) : string
Parameters
- $record : object
-
Object containing the record data.
- $connector : string
-
Record connector.
- $context : string
-
Record context.
Return values
string —Author data token value.
get_mainwp_maintenance_token_value()
Get the Maintanence token value.
private
get_mainwp_maintenance_token_value(object $record, string $data) : string
Parameters
- $record : object
-
Object containing the record data.
- $data : string
-
Data to process.
Return values
string —Maintanence token value.
get_other_tokens_count()
Get the other tokens count.
private
get_other_tokens_count(object $records, string $connector, string $context, string $action, array<string|int, mixed> &$skip_records, array<string|int, mixed> &$backups_created_time_to_fix) : int
Parameters
- $records : object
-
Object containng reports records.
- $connector : string
-
Record connector.
- $context : string
-
Record context.
- $action : string
-
Record action.
- $skip_records : array<string|int, mixed>
-
Records to skip.
- $backups_created_time_to_fix : array<string|int, mixed>
-
Backups created time.
Return values
int —The count number.
get_result_data_token_value()
Get the result data token value.
private
get_result_data_token_value(object $record, string $context, string $data) : string
Parameters
- $record : object
-
Object containing the record data.
- $context : string
-
Record context.
- $data : string
-
Data to process.
Return values
string —Result data token value.
get_section_loop_token_values()
Get the section loop token values.
private
get_section_loop_token_values(object $record, string $context, array<string|int, mixed> $tokens) : array<string|int, mixed>
Parameters
- $record : object
-
Object containing the record data.
- $context : string
-
Record context.
- $tokens : array<string|int, mixed>
-
An array containg the report tokens.
Tags
Return values
array<string|int, mixed> —Token values.
get_stream_get_not_in_params()
Get the Stream excluded parameters.
private
get_stream_get_not_in_params(array<string|int, mixed> $sections, array<string|int, mixed> $other_tokens) : bool
Parameters
- $sections : array<string|int, mixed>
-
An array containing sections.
- $other_tokens : array<string|int, mixed>
-
An array containing other tokens.
Return values
bool —true|false
get_sucuri_scan_token_value()
Get the Sucuri scan token value.
private
get_sucuri_scan_token_value(object $record, string $data) : string
Parameters
- $record : object
-
Object containing the record data.
- $data : string
-
Data to process.
Return values
string —Sucuri scan token value.