• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/web/http/stream.php
  • Класс: Bitrix\Main\Web\Http\Stream
  • Вызов: Stream::write
public function write(string $string): int
{
	if (!$this->resource)
	{
		throw new \RuntimeException('No resource available, cannot write.');
	}

	$result = fwrite($this->resource, $string);

	if ($result === false)
	{
		throw new \RuntimeException('Error writing to stream.');
	}

	return $result;
}