* @var array
* @link https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md
*/
- public static $severityMap = array(
+ protected static $severityList = array(
\Psr\Log\LogLevel::DEBUG,
\Psr\Log\LogLevel::INFO,
\Psr\Log\LogLevel::NOTICE,
return self::$_singleton;
}
+ /**
+ * @return array
+ */
+ public static function getSeverityList() {
+ return self::$severityList;
+ }
+
/**
* Execute "checkAll".
*
$severity = strtolower($severity);
}
- return ($reverse) ? self::$severityMap[$severity] : array_search($severity, self::$severityMap);
+ return ($reverse) ? self::$severityList[$severity] : array_search($severity, self::$severityList);
}
/**
'title' => 'Severity',
'description' => 'Psr\Log\LogLevel string',
'type' => CRM_Utils_Type::T_STRING,
- 'options' => array_combine(CRM_Utils_Check::$severityMap, CRM_Utils_Check::$severityMap),
+ 'options' => array_combine(CRM_Utils_Check::getSeverityList(), CRM_Utils_Check::getSeverityList()),
);
$spec['severity_id'] = array(
'title' => 'Severity ID',
'description' => 'Integer representation of Psr\Log\LogLevel',
'type' => CRM_Utils_Type::T_INT,
- 'options' => CRM_Utils_Check::$severityMap,
+ 'options' => CRM_Utils_Check::getSeverityList(),
);
$spec['is_visible'] = array(
'title' => 'is visible',