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: 153 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

CachingStream:: (9 methods):
  __construct()
  getSize()
  rewind()
  seek()
  read()
  write()
  eof()
  close()
  cacheEntireStream()


Class: CachingStream  - X-Ref

Stream decorator that can cache previously read bytes from a sequentially
read stream.

__construct(StreamInterface $stream,StreamInterface $target = null)   X-Ref
We will treat the buffer object as the body of the stream

param: StreamInterface $stream Stream to cache. The cursor is assumed to be at the beginning of the stream.
param: StreamInterface $target Optionally specify where data is cached

getSize()   X-Ref
No description

rewind()   X-Ref
No description

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

read($length)   X-Ref
No description

write($string)   X-Ref
No description

eof()   X-Ref
No description

close()   X-Ref
Close both the remote stream and buffer stream


cacheEntireStream()   X-Ref
No description