12 use StreamDecoratorTrait;
37 return stream_for(try_fopen($this->filename, $this->mode));
An exception for terminatinating execution or to throw for unit testing.
Lazily reads or writes to a file that is opened only after an IO operation take place on the stream.
__construct($filename, $mode)
createStream()
Creates the underlying stream lazily when required.
stream_for($resource='', array $options=[])
Create a new stream based on the input type.