Search moodle.org's
Developer Documentation

See Release Notes

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

(no description)

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

Defines 1 class

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


Class: Stream  - X-Ref

PHP stream implementation.

__construct($stream, array $options = [])   X-Ref
This constructor accepts an associative array of options.

- size: (int) If a read stream would otherwise have an indeterminate
size, but the size is known due to foreknowledge, then you can
provide that size, in bytes.
- metadata: (array) Any additional metadata to return when the metadata
of the stream is accessed.

param: resource                            $stream  Stream resource to wrap.
param: array{size?: int, metadata?: array} $options Associative array of options.

__destruct()   X-Ref
Closes the stream when the destructed


__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

eof()   X-Ref
No description

tell()   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

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

return: mixed