Moodle PHP Documentation 4.1
Moodle 4.1.19+ (Build: 20250711) (5f47dc23ffc)
Stream_Wrapper

Functions

static getStream ($data)
 Create a stream from multiple data sources.
 
static getStream (&$string)
 Create a stream from a PHP string.
 
 stream_close ()
 
 stream_eof ()
 
 stream_open ($path, $mode, $options, &$opened_path)
 
 stream_read ($count)
 
 stream_seek ($offset, $whence)
 
 stream_stat ()
 
 stream_tell ()
 
 stream_write ($data)
 

Variables

boolean $_ateof = false
 Have we reached EOF?
 
array $_data = array()
 Array that holds the various streams.
 
integer $_datapos = 0
 The current position in the data array.
 
integer $_length = 0
 The combined length of the stream.
 
integer $_pos
 String position.
 
integer $_position = 0
 The current position in the string.
 
string $_string
 The string.
 
resource $context
 Context.
 
resource $context
 The current context.
 
*See the enclosed file LICENSE for license information(BSD). If you *did not receive this file see http
 
*See the enclosed file LICENSE for license information(BSD). If you *did not receive this file see http
 
*See the enclosed file LICENSE for license information(BSD). If you *did not receive this file see http
 
*See the enclosed file LICENSE for license information(BSD). If you *did not receive this file see http
 

Detailed Description

Function Documentation

◆ getStream() [1/2]

static getStream ( $data)
static

Create a stream from multiple data sources.

Since
2.1.0
Parameters
array$dataAn array of strings and/or streams to combine into a single stream.
Return values
resourceA PHP stream.

◆ getStream() [2/2]

static getStream ( & $string)
static

Create a stream from a PHP string.

Since
2.1.0
Parameters
string&$stringA PHP string variable.
Return values
resourceA PHP stream pointing to the variable.

◆ stream_close()

stream_close ( )
See also
streamWrapper::stream_close()

◆ stream_eof()

stream_eof ( )
See also
streamWrapper::stream_eof()
Return values
boolean
See also
streamWrapper::stream_eof()

◆ stream_open()

stream_open ( $path,
$mode,
$options,
& $opened_path )
See also
streamWrapper::stream_open()
Parameters
string$path
string$mode
integer$options
string&$opened_path
Exceptions
Exception
See also
streamWrapper::stream_open()

◆ stream_read()

stream_read ( $count)
See also
streamWrapper::stream_read()
Parameters
integer$count
Return values
mixed
See also
streamWrapper::stream_read()

◆ stream_seek()

stream_seek ( $offset,
$whence )
See also
streamWrapper::stream_seek()
Parameters
integer$offset
integer$whenceSEEK_SET, SEEK_CUR, or SEEK_END
Return values
boolean
See also
streamWrapper::stream_seek()

◆ stream_stat()

stream_stat ( )
See also
streamWrapper::stream_stat()
Return values
array
See also
streamWrapper::stream_stat()

◆ stream_tell()

stream_tell ( )
See also
streamWrapper::stream_tell()
Return values
integer
See also
streamWrapper::stream_tell()

◆ stream_write()

stream_write ( $data)
See also
streamWrapper::stream_write()
Parameters
string$data
Return values
integer
See also
streamWrapper::stream_write()