Make getMonitorCapturingOptions a member of the class, so can call it getCapturingOptions. Same with Analysing and Recording options

This commit is contained in:
Isaac Connor 2022-02-27 14:03:37 -05:00
parent 47fae7a296
commit 13251b133a
1 changed files with 15 additions and 15 deletions

View File

@ -9,9 +9,10 @@ require_once('Model.php');
require_once('Server.php'); require_once('Server.php');
require_once('Storage.php'); require_once('Storage.php');
$FunctionTypes = null; class Monitor extends ZM_Object {
protected static $FunctionTypes = null;
function getMonitorFunctionTypes() { public static function getFunctionTypes() {
if (!isset($FunctionTypes)) { if (!isset($FunctionTypes)) {
$FunctionTypes = array( $FunctionTypes = array(
'None' => translate('FnNone'), 'None' => translate('FnNone'),
@ -25,8 +26,8 @@ function getMonitorFunctionTypes() {
return $FunctionTypes; return $FunctionTypes;
} }
$CapturingOptions = null; protected static $CapturingOptions = null;
function getCapturingOptions() { public static function getCapturingOptions() {
if (!isset($MonitorCapturingOptions)) { if (!isset($MonitorCapturingOptions)) {
$CapturingOptions = array( $CapturingOptions = array(
'None'=>translate('None'), 'None'=>translate('None'),
@ -37,8 +38,8 @@ function getCapturingOptions() {
return $CapturingOptions; return $CapturingOptions;
} }
$AnalysingOptions = null; protected static $AnalysingOptions = null;
function getAnalysingOptions() { public static function getAnalysingOptions() {
if (!isset($AnalysingOptions)) { if (!isset($AnalysingOptions)) {
$AnalysingOptions = array( $AnalysingOptions = array(
'None' => translate('None'), 'None' => translate('None'),
@ -48,8 +49,8 @@ function getAnalysingOptions() {
return $AnalysingOptions; return $AnalysingOptions;
} }
$MonitorAnalysisSourceOptions = null; protected static $MonitorAnalysisSourceOptions = null;
function getMonitorAnalysisSourceOptions() { public static function getAnalysisSourceOptions() {
if (!isset($MonitorAnalysisSourceOptions)) { if (!isset($MonitorAnalysisSourceOptions)) {
$MonitorAnalysisSourceOptions = array( $MonitorAnalysisSourceOptions = array(
'Primary' => translate('Primary'), 'Primary' => translate('Primary'),
@ -59,8 +60,8 @@ function getMonitorAnalysisSourceOptions() {
return $MonitorAnalysisSourceOptions; return $MonitorAnalysisSourceOptions;
} }
$RecordingOptions = null; protected static $RecordingOptions = null;
function getRecordingOptions() { public static function getRecordingOptions() {
if (!isset($RecordingOptions)) { if (!isset($RecordingOptions)) {
$RecordingOptions = array( $RecordingOptions = array(
'None' => translate('None'), 'None' => translate('None'),
@ -71,8 +72,8 @@ function getRecordingOptions() {
return $RecordingOptions; return $RecordingOptions;
} }
$MonitorRecordingSourceOptions = null; protected static $MonitorRecordingSourceOptions = null;
function getMonitorRecordingSourceOptions() { public static function getRecordingSourceOptions() {
if (!isset($MonitorRecordingSourceOptions)) { if (!isset($MonitorRecordingSourceOptions)) {
$MonitorRecordingSourceOptions = array( $MonitorRecordingSourceOptions = array(
'Primary' => translate('Primary'), 'Primary' => translate('Primary'),
@ -83,8 +84,8 @@ function getMonitorRecordingSourceOptions() {
return $MonitorRecordingSourceOptions; return $MonitorRecordingSourceOptions;
} }
$Statuses = null; protected static $Statuses = null;
function getMonitorStatuses() { public static function getStatuses() {
if (!isset($Statuses)) { if (!isset($Statuses)) {
$Statuses = array( $Statuses = array(
-1 => 'Unknown', -1 => 'Unknown',
@ -98,7 +99,6 @@ function getMonitorStatuses() {
return $Statuses; return $Statuses;
} }
class Monitor extends ZM_Object {
protected static $table = 'Monitors'; protected static $table = 'Monitors';
protected $defaults = array( protected $defaults = array(