1
0
mirror of synced 2025-01-19 17:31:43 +03:00

30 lines
583 B
PHP
Raw Normal View History

2021-05-31 16:33:02 +03:00
<?php
namespace Intaro\RetailCrm\Repository;
use CSite;
use RetailcrmConfigProvider;
/**
* Class SiteRepository
* @package Intaro\RetailCrm\Repository
*/
class SiteRepository
{
/**
* @return string
*/
public static function getDefaultServerName(): ?string
{
$rsSites = CSite::GetList($by, $sort, ['ACTIVE' => 'Y']);
while ($ar = $rsSites->Fetch()) {
if ($ar['DEF'] === 'Y') {
return RetailcrmConfigProvider::getProtocol() . $ar['SERVER_NAME'];
}
}
return null;
}
}