• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/lib/dictionary/remotedictionary.php
  • Класс: BitrixRestDictionaryRemoteDictionary
  • Вызов: RemoteDictionary::init
protected function init()
{
	$managedCache = Application::getInstance()->getManagedCache();
	if($managedCache->read(static::CACHE_TTL, $this->getCacheId()))
	{
		$dictionary = $managedCache->get($this->getCacheId());
	}
	else
	{
		$dictionary = $this->load();

		$managedCache->set($this->getCacheId(), $dictionary);
	}

	$event = new Event('rest', 'onRemoteDictionaryLoad', array(
		'ID' => static::ID,
		'DICTIONARY' => &$dictionary
	));
	$event->send();

	return $dictionary;
}