• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/web/http/promise.php
  • Класс: BitrixMainWebHttpPromise
  • Вызов: Promise::fulfill
public function fulfill(ResponseInterface $response): void
{
	$this->state = self::FULFILLED;
	$this->response = $response;

	while (!empty($this->onFulfilled))
	{
		$callback = array_shift($this->onFulfilled);
		$response = call_user_func($callback, $this->response);

		if ($response instanceof ResponseInterface)
		{
			$this->response = $response;
		}
	}
}