• Модуль: security
  • Путь к файлу: ~/bitrix/modules/security/classes/general/tests/cloud_monitor.php
  • Класс: CSecurityCloudMonitorTest
  • Вызов: CSecurityCloudMonitorTest::receiveResults
protected function receiveResults()
{
	if($this->sessionData->getInt('results_repeat_count') > self::MAX_RESULTS_REQUEST_REPEAT_COUNT)
		$this->stopChecking(GetMessage('SECURITY_SITE_CHECKER_CLOUD_UNAVAILABLE'));

	$response = new CSecurityCloudMonitorRequest('get_results', $this->protocolVersion, $this->getCheckingToken());
	if($response->isOk())
	{
		$this->sessionData->flushData();
		$results = $response->getValue('results');
		if(is_array($results) && count($results) > 0)
		{
			$isSomethingFound = true;
			$problemCount = count($results);
			$errors = self::formatResults($results);
		}
		else
		{
			$isSomethingFound = false;
			$problemCount = 0;
			$errors = array();
		}
		$this->setCheckingResult(array(
			'problem_count' => $problemCount,
			'errors' => $errors,
			'status' => !$isSomethingFound
		));

	}
	elseif($response->isFatalError())
	{
		$this->stopChecking($response->getValue('error_text'));
	}
	else
	{
		$this->sessionData->increment('results_repeat_count');
	}
}