• Модуль: seo
  • Путь к файлу: ~/bitrix/modules/seo/lib/engine/yandexdirect.php
  • Класс: BitrixSeoEngineYandexDirect
  • Вызов: YandexDirect::getClientsSettings
public function getClientsSettings()
{
	$cacheManager = Application::getInstance()->getManagedCache();
	
	if ($cacheManager->read(self::CACHE_TTL, self::CACHE_ID))
	{
		$result = $cacheManager->get(self::CACHE_ID);
	}
	else
	{
		$result = $this->getProxy()->getInterface()->getClientsSettings(static::ENGINE_ID);
	}
	
	if(!is_array($result) || empty($result))
		$result = array('error' => 'No authentication.');
	
	if (!empty($result['error']))
		throw new YandexDirectException($result);
	else
		$cacheManager->set(self::CACHE_ID, $result);
	
	return $result;
}