• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/web/http/stream.php
  • Класс: Bitrix\Main\Web\Http\Stream
  • Вызов: Stream::__construct
public function __construct($stream, $mode = 'r')
{
	if (is_resource($stream))
	{
		$this->resource = $stream;
	}
	elseif ($stream instanceof Stream)
	{
		$this->resource = $stream->resource;
	}
	elseif (is_string($stream))
	{
		$this->resource = fopen($stream, $mode);
	}
	else
	{
		throw new ArgumentException('Stream must be a Stream object, a string identifier, or a resource.', 'stream');
	}
}