private function parseThresholds($thresholds)
	{
		$log = $this->log;

		if (strpos($thresholds, ','))
		{
			$thresholds = explode(',', $thresholds);
		}
		else
		{
			$thresholds = (array)$thresholds;
		}

		$threshold = array();
		foreach ($thresholds as $t)
		{
			preg_match('/([[:alpha:]]+)[\s]*([=|>|<])[\s]*([[:alnum:]\.]+)/', $t, $params);

			if (isset($params[1])
			 && isset($params[2])
			 && isset($params[3])
			 && $log::isField(trim($params[1])))
			{
				$threshold[trim($params[1])] = [
					'key'      => $params[1],
					'operator' => $params[2],
					'value'    => $params[3]
				];
			}
		}

		return $threshold;
	}
private function parseThresholds($thresholds)
	{
		$log = $this->log;

		if (strpos($thresholds, ','))
		{
			$thresholds = explode(',', $thresholds);
		}
		else
		{
			$thresholds = (array)$thresholds;
		}

		$threshold = array();
		foreach ($thresholds as $t)
		{
			preg_match('/([[:alpha:]]+)[\s]*([=|>|<])[\s]*([[:alnum:]\.]+)/', $t, $params);

			if (isset($params[1])
			 && isset($params[2])
			 && isset($params[3])
			 && $log::isField(trim($params[1])))
			{
				$threshold[trim($params[1])] = [
					'key'      => $params[1],
					'operator' => $params[2],
					'value'    => $params[3]
				];
			}
		}

		return $threshold;
	}
private function parseThresholds ( $ thresholds ) { $ log = $ this -> log ; if ( strpos ( $ thresholds , ',' ) ) { $ thresholds = explode ( ',' , $ thresholds ) ; } else { $ thresholds = ( array ) $ thresholds ; } $ threshold = array ( ) ; foreach ( $ thresholds as $ t ) { preg_match ( '/([[:alpha:]]+)[\s]*([=|>|<])[\s]*([[:alnum:]\.]+)/' , $ t , $ params ) ; if ( isset ( $ params [ 1 ] ) && isset ( $ params [ 2 ] ) && isset ( $ params [ 3 ] ) && $ log :: isField ( trim ( $ params [ 1 ] ) ) ) { $ threshold [ trim ( $ params [ 1 ] ) ] = [ 'key' => $ params [ 1 ] , 'operator' => $ params [ 2 ] , 'value' => $ params [ 3 ] ] ; } } return $ threshold ; }
Parse thresholds from user input to array

@param   string  $thresholds  The threshold input string to parse
@return  array
Parse thresholds from user input to array