YoastSEO_Vendor\GuzzleHttp\Psr7
CachingStream::read() public Yoast 1.0
{} Это метод класса: CachingStream{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
$CachingStream = new CachingStream(); $CachingStream->read( $length );
Код CachingStream::read() CachingStream::read Yoast 15.6.2
public function read($length)
{
// Perform a regular read on any previously read data from the buffer
$data = $this->stream->read($length);
$remaining = $length - \strlen($data);
// More data was requested so read from the remote stream
if ($remaining) {
// If data was written to the buffer in a position that would have
// been filled from the remote stream, then we must skip bytes on
// the remote stream to emulate overwriting bytes from that
// position. This mimics the behavior of other PHP stream wrappers.
$remoteData = $this->remoteStream->read($remaining + $this->skipReadBytes);
if ($this->skipReadBytes) {
$len = \strlen($remoteData);
$remoteData = \substr($remoteData, $this->skipReadBytes);
$this->skipReadBytes = \max(0, $this->skipReadBytes - $len);
}
$data .= $remoteData;
$this->stream->write($remoteData);
}
return $data;
}