• Модуль: mobile
  • Путь к файлу: ~/bitrix/modules/mobile/lib/context.php
  • Класс: BitrixMobileContext
  • Вызов: Context::__construct
public function __construct(array $options = [])
{
	global $USER;

	if (empty($options))
	{
		$options = self::autodetectContext();
	}

	$this->userId = $options['userId'] ?? $USER->getId();
	$this->siteId = $options['siteId'] ?? SITE_ID;
	$this->siteDir = $options['siteDir'] ?? SITE_DIR;
	$this->extranet = isset($options['extranet']) ? (bool)$options['extranet'] : false;
	$this->version = $options['version'] ?? '1';
}