TraceableSourceStream implements SourceStream
FinalYes
Interfaces
Methods
- __construct() : mixed
- close() : void
- content() : string
- isOpen() : bool
- iterate() : Generator<string|int, string>
- path() : Path
- read() : string
- readLines() : Generator<string|int, string>
- Yields the stream's lines with the separator stripped: a 0-byte stream yields nothing, a separator that ends the stream opens no further line, and every other empty line is yielded as ''. The separator is matched byte for byte; no "\r" is stripped. "x\ny\n" -> ["x","y"], "x\n\ny" -> ["x","","y"], "x\n\n" -> ["x",""], "x\r\ny" -> ["x\r","y"], "" -> [].
- size() : null|int
Methods
__construct()
public
__construct(SourceStream $stream, FilesystemTelemetryConfig $telemetryConfig) : mixed
Parameters
- $stream : SourceStream
- $telemetryConfig : FilesystemTelemetryConfig
close()
public
close() : void
content()
public
content() : string
Return values
stringisOpen()
public
isOpen() : bool
Return values
booliterate()
public
iterate([int<1, max> $length = 1 ]) : Generator<string|int, string>
Parameters
- $length : int<1, max> = 1
Return values
Generator<string|int, string>path()
public
path() : Path
Return values
Pathread()
public
read(int<1, max> $length, int $offset) : string
Parameters
- $length : int<1, max>
- $offset : int
-
The offset where to start reading from the stream. If negative, reading will start from the end of the stream.
Return values
stringreadLines()
Yields the stream's lines with the separator stripped: a 0-byte stream yields nothing, a separator that ends the stream opens no further line, and every other empty line is yielded as ''. The separator is matched byte for byte; no "\r" is stripped. "x\ny\n" -> ["x","y"], "x\n\ny" -> ["x","","y"], "x\n\n" -> ["x",""], "x\r\ny" -> ["x\r","y"], "" -> [].
public
readLines([string $separator = "\n" ][, null|int<1, max> $length = null ]) : Generator<string|int, string>
Parameters
- $separator : string = "\n"
-
multi-byte included
- $length : null|int<1, max> = null
Return values
Generator<string|int, string>size()
public
size() : null|int
Return values
null|int —The size of the stream in bytes