LeasedStream
final class LeasedStream
Constants
| PROTOCOL |
|
Properties
| resource | $context |
Methods
Open a leased stream from its private stream context.
Read from the inner stream.
Determine if the inner stream is at end-of-file.
Seek to a position in the inner stream.
Get the current inner-stream position.
Get statistics for the inner stream.
Expose the inner stream to resource-casting APIs.
Apply supported stream options to the inner stream.
Close the inner stream and finalize its lease without throwing.
Details
at line 33
static mixed
wrap(mixed $resource, Lease $lease)
Wrap a resource so its lease is finalized when the stream closes.
at line 94
bool
stream_open(string $path, string $mode, int $options, string|null $openedPath)
Open a leased stream from its private stream context.
at line 114
false|string
stream_read(int $count)
Read from the inner stream.
at line 122
bool
stream_eof()
Determine if the inner stream is at end-of-file.
at line 130
bool
stream_seek(int $offset, int $whence = SEEK_SET)
Seek to a position in the inner stream.
at line 138
false|int
stream_tell()
Get the current inner-stream position.
at line 146
array|false
stream_stat()
Get statistics for the inner stream.
at line 156
mixed
stream_cast(int $castAs)
Expose the inner stream to resource-casting APIs.
at line 164
bool
stream_set_option(int $option, int $arg1, int|null $arg2)
Apply supported stream options to the inner stream.
at line 185
void
stream_close()
Close the inner stream and finalize its lease without throwing.