WordPress\AiClientDependencies\Nyholm\Psr7

Stream::read │ public │ WP 1.0

Метод класса: Stream{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$Stream = new Stream();
$Stream->read( $length ): string;
$length(обязательный)
.

Код Stream::read() WP 7.1.2

public function read($length): string
{
    if (!isset($this->stream)) {
        throw new \RuntimeException('Stream is detached');
    }
    if (!$this->readable) {
        throw new \RuntimeException('Cannot read from non-readable stream');
    }
    if (\false === $result = @\fread($this->stream, $length)) {
        throw new \RuntimeException('Unable to read from stream: ' . (\error_get_last()['message'] ?? ''));
    }
    return $result;
}