CBitrixCloudCDNLocation::getServerNameByPrefixAndExtension: Bitrix method

      
<?php 
//  CBitrixCloudCDNLocation :: getServerNameByPrefixAndExtension()
//  /dist/bitrix/modules/bitrixcloud/classes/general/cdn_location.php:200

    
public function getServerNameByPrefixAndExtension($p_prefix$p_extension$p_link)
    {
        foreach (
$this->prefixes as $prefix)
        {
            if (
$p_prefix === $prefix)
            {
                foreach (
$this->classes as $i => $file_class)
                {
                    
/* @var CBitrixCloudCDNClass $file_class */
                    
foreach ($file_class->getExtensions() as $extension)
                    {
                        if (
strtolower($p_extension) === $extension)
                        {
                            
/* @var CBitrixCloudCDNServerGroup $server_group */
                            
$server_group $this->server_groups[$i];
                            
$servers $server_group->getServers();
                            if (!empty(
$servers))
                            {
                                
$j intval(abs(crc32($p_link))) % count($servers);
                                return 
$servers[$j];
                            }
                        }
                    }
                }
            }
        }
        return 
"";
    }