SourceStreamWrapper implements StreamWrapper
FinalYes
Serves a SourceStream, read-only and forward-only, to a native reader that opens nothing but a URI, like XMLReader::open().
Interfaces
Constants
- PROTOCOL : mixed = 'flow-source'
Properties
- $context : null|resource
Methods
- register() : void
- stream_close() : void
- stream_eof() : bool
- stream_flush() : bool
- stream_lock() : bool
- stream_open() : bool
- stream_read() : string|false
- stream_seek() : bool
- stream_stat() : array<string|int, mixed>|false
- stream_tell() : int
- stream_write() : int
- uri() : string
- The URI opens $source once. The source stays the caller's to close.
- url_stat() : array<string|int, mixed>|false
- A URI not opened yet exists; libxml stats it before it opens it.
Constants
PROTOCOL
public
mixed
PROTOCOL
= 'flow-source'
Properties
$context
public
null|resource
$context
Methods
register()
public
static register() : void
stream_close()
public
stream_close() : void
stream_eof()
public
stream_eof() : bool
Return values
boolstream_flush()
public
stream_flush() : bool
Return values
boolstream_lock()
public
stream_lock(int $operation) : bool
Parameters
- $operation : int
Return values
boolstream_open()
public
stream_open(string $path, string $mode, int $options, string|null &$opened_path) : bool
Parameters
- $path : string
- $mode : string
- $options : int
- $opened_path : string|null
Return values
boolstream_read()
public
stream_read(int $count) : string|false
Parameters
- $count : int
Return values
string|falsestream_seek()
public
stream_seek(int $offset[, int $whence = SEEK_SET ]) : bool
Parameters
- $offset : int
- $whence : int = SEEK_SET
Return values
boolstream_stat()
public
stream_stat() : array<string|int, mixed>|false
Return values
array<string|int, mixed>|falsestream_tell()
public
stream_tell() : int
Return values
intstream_write()
public
stream_write(string $data) : int
Parameters
- $data : string
Return values
inturi()
The URI opens $source once. The source stays the caller's to close.
public
static uri(SourceStream $source[, int<1, max> $length = 8192 ]) : string
Parameters
- $source : SourceStream
- $length : int<1, max> = 8192
-
bytes requested from $source per read
Return values
stringurl_stat()
A URI not opened yet exists; libxml stats it before it opens it.
public
url_stat(string $path, int $flags) : array<string|int, mixed>|false
Parameters
- $path : string
- $flags : int