Documentation

CRM_Utils_Check
in package

Tags
copyright

CiviCRM LLC https://civicrm.org/licensing

Table of Contents

Constants

CHECK_TIMER  = 86400

Properties

$severityList  : array<string|int, mixed>
$_singleton  : object
We only need one instance of this object, so we use the singleton pattern and cache the instance in this variable

Methods

assertValid()  : mixed
Throw an exception if any of the checks fail.
checkAll()  : array<string|int, CRM_Utils_Check_Message>
Run all enabled system checks.
checkStatus()  : array<string|int, CRM_Utils_Check_Message>
getSeverityList()  : array<string|int, mixed>
getSeverityOptions()  : array<string|int, array<string|int, mixed>>
severityMap()  : string|int
Get the integer value (useful for thresholds) of the severity.
showPeriodicAlerts()  : mixed
Display daily system status alerts (admin only).
singleton()  : CRM_Utils_Check
Provide static instance of CRM_Utils_Check.
toStatusLabel()  : string

Constants

CHECK_TIMER

public mixed CHECK_TIMER = 86400

Properties

$_singleton

We only need one instance of this object, so we use the singleton pattern and cache the instance in this variable

private static object $_singleton = \NULL

Methods

assertValid()

Throw an exception if any of the checks fail.

public assertValid([array<string|int, mixed>|null $messages = NULL ][, string $threshold = PsrLogLogLevel::ERROR ]) : mixed
Parameters
$messages : array<string|int, mixed>|null = NULL

[CRM_Utils_Check_Message]

$threshold : string = PsrLogLogLevel::ERROR
Tags
throws
CRM_Core_Exception
throws
Exception

checkStatus()

public static checkStatus([array<string|int, mixed> $statusNames = [] ][, bool $includeDisabled = FALSE ]) : array<string|int, CRM_Utils_Check_Message>
Parameters
$statusNames : array<string|int, mixed> = []

Optionally specify the names of specific checks to run, or leave empty to run all

$includeDisabled : bool = FALSE

Run checks that have been explicitly disabled (default false)

Return values
array<string|int, CRM_Utils_Check_Message>

getSeverityList()

public static getSeverityList() : array<string|int, mixed>
Return values
array<string|int, mixed>

getSeverityOptions()

public static getSeverityOptions() : array<string|int, array<string|int, mixed>>
Return values
array<string|int, array<string|int, mixed>>

severityMap()

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

public static severityMap(int|string $severity[, bool $reverse = FALSE ]) : string|int
Parameters
$severity : int|string

the value to look up

$reverse : bool = FALSE

whether to find the constant from the integer

Tags
throws
CRM_Core_Exception
Return values
string|int

showPeriodicAlerts()

Display daily system status alerts (admin only).

public showPeriodicAlerts() : mixed

toStatusLabel()

public static toStatusLabel(int $level) : string
Parameters
$level : int
Return values
string

        
On this page

Search results