28 $diff = $this->maxLength - $this->stream->getSize();
36 if (strlen($string) < $diff) {
37 return $this->stream->write($string);
40 return $this->stream->write(substr($string, 0, $diff));
$stream
PHP stream implementation.
__construct(StreamInterface $stream, $maxLength)
Stream decorator that begins dropping data once the size of the underlying stream becomes too full...
write($string)
Write data to the stream.