class CRM_Utils_Check

Constants

CHECK_TIMER

Properties

static protected array $severityList

Methods

static CRM_Utils_Check
singleton()

Provide static instance of CRM_Utils_Check.

static array
getSeverityList()

No description

showPeriodicAlerts()

Display daily system status alerts (admin only).

static int
severitySort(CRM_Utils_Check_Message $a, CRM_Utils_Check_Message $b)

Sort messages based upon severity

static string|int
severityMap(int|string $severity, bool $reverse = FALSE)

Get the integer value (useful for thresholds) of the severity.

assertValid(array|NULL $messages = NULL, string $threshold = \Psr\Log\LogLevel::ERROR)

Throw an exception if any of the checks fail.

static array
checkAll(bool $max = FALSE)

Run all system checks.

static string
toStatusLabel(int $level)

No description

Details

at line 65
static CRM_Utils_Check singleton()

Provide static instance of CRM_Utils_Check.

Return Value

CRM_Utils_Check

at line 75
static array getSeverityList()

Return Value

array

at line 82
showPeriodicAlerts()

Display daily system status alerts (admin only).

at line 126
static int severitySort(CRM_Utils_Check_Message $a, CRM_Utils_Check_Message $b)

Sort messages based upon severity

Parameters

CRM_Utils_Check_Message $a
CRM_Utils_Check_Message $b

Return Value

int

at line 146
static string|int severityMap(int|string $severity, bool $reverse = FALSE)

Get the integer value (useful for thresholds) of the severity.

Parameters

int|string $severity the value to look up
bool $reverse whether to find the constant from the integer

Return Value

string|int

Exceptions

CRM_Core_Exception

at line 172
assertValid(array|NULL $messages = NULL, string $threshold = \Psr\Log\LogLevel::ERROR)

Throw an exception if any of the checks fail.

Parameters

array|NULL $messages [CRM_Utils_Check_Message]
string $threshold

Exceptions

CRM_Core_Exception
Exception

at line 202
static array checkAll(bool $max = FALSE)

Run all system checks.

This functon is wrapped by the System.check api.

Calls hook_civicrm_check() for extensions to add or modify messages.

Parameters

bool $max Whether to return just the maximum non-hushed severity

Return Value

array Array of CRM_Utils_Check_Message objects

at line 235
static string toStatusLabel(int $level)

Parameters

int $level

Return Value

string