ReCaptcha::__construct

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. ReCaptcha
  4. __construct
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/webform/recaptcha.php
  • Класс: Bitrix\Crm\WebForm\ReCaptcha
  • Вызов: ReCaptcha::__construct
public function __construct($secret, HttpClient $httpClient = null)
{
	if (empty($secret))
	{
		throw new SystemException('No secret provided');
	}

	if (!is_string($secret))
	{
		throw new SystemException('The provided secret must be a string');
	}

	$this->secret = $secret;
	if (!is_null($httpClient))
	{
		$this->httpClient = $httpClient;
	}
	else
	{
		$this->httpClient = new HttpClient();
	}
}

Добавить комментарий