Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

(no description)

File Size: 149 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

BufferStream:: (16 methods):
  __construct()
  __toString()
  getContents()
  close()
  detach()
  getSize()
  isReadable()
  isWritable()
  isSeekable()
  rewind()
  seek()
  eof()
  tell()
  read()
  write()
  getMetadata()


Class: BufferStream  - X-Ref

Provides a buffer stream that can be written to to fill a buffer, and read
from to remove bytes from the buffer.

This stream returns a "hwm" metadata value that tells upstream consumers
what the configured high water mark of the stream is, or the maximum
preferred size of the buffer.
__construct(int $hwm = 16384)   X-Ref

param: int $hwm High water mark, representing the preferred maximum

__toString()   X-Ref
No description

getContents()   X-Ref
No description

close()   X-Ref
No description

detach()   X-Ref
No description

getSize()   X-Ref
No description

isReadable()   X-Ref
No description

isWritable()   X-Ref
No description

isSeekable()   X-Ref
No description

rewind()   X-Ref
No description

seek($offset, $whence = SEEK_SET)   X-Ref
No description

eof()   X-Ref
No description

tell()   X-Ref
No description

read($length)   X-Ref
Reads data from the buffer.


write($string)   X-Ref
Writes data to the buffer.


getMetadata($key = null)   X-Ref
{@inheritdoc}

return: mixed