• Модуль: bitrixcloud
  • Путь к файлу: ~/bitrix/modules/bitrixcloud/classes/general/monitoring.php
  • Класс: CBitrixCloudMonitoring
  • Вызов: CBitrixCloudMonitoring::getList
public function getList()
{
	$web_service = new CBitrixCloudMonitoringWebService();
	$xml = $web_service->actionGetList();
	$xml = $xml->SelectNodes("/control/domains");
	if (is_object($xml))
	{
		$result = array();
		$children = $xml->children();
		if (is_array($children))
		{
			foreach($children as $domainXml)
			{
				$name = $domainXml->getAttribute("name");
				$emails = $domainXml->elementsByName("emails");
				$tests = $domainXml->elementsByName("tests");
				$result[] = array(
					"DOMAIN" => $name,
					"IS_HTTPS" => ($domainXml->getAttribute("https") === "true"? "Y": "N"),
					"LANG" => $domainXml->getAttribute("lang"),
					"EMAILS" => (is_array($emails)? explode(",", $emails[0]->textContent()): array()),
					"TESTS" => (is_array($tests)? explode(",", $tests[0]->textContent()): array()),
				);
			}
		}
		return $result;
	}
}