- Модуль: location
- Путь к файлу: ~/bitrix/modules/location/lib/source/google/googlesource.php
- Класс: BitrixLocationSourceGoogleGoogleSource
- Вызов: GoogleSource::makeRepository
public function makeRepository(): IRepository
{
static $result = null;
if (!is_null($result))
{
return $result;
}
$httpClient = new HttpClient(
[
'version' => '1.1',
'socketTimeout' => 30,
'streamTimeout' => 30,
'redirect' => true,
'redirectMax' => 5,
]
);
$cacheTTL = 2592000; //month
$poolSize = 100;
$pool = new Pool($poolSize);
$cachePool = new CachedPool(
$pool,
$cacheTTL,
'locationSourceGoogleRequester',
Cache::createInstance(),
EventManager::getInstance()
);
$result = new Repository(
$this->getBackendKey(),
$httpClient,
$this,
$cachePool
);
return $result;
}