Open Journal Systems  3.3.0
GuzzleHttp\Psr7\LazyOpenStream Class Reference
Inheritance diagram for GuzzleHttp\Psr7\LazyOpenStream:
Psr\Http\Message\StreamInterface

Public Member Functions

 __construct ($filename, $mode)
 
- Public Member Functions inherited from Psr\Http\Message\StreamInterface
 __toString ()
 
 close ()
 
 detach ()
 
 eof ()
 
 getContents ()
 
 getMetadata ($key=null)
 
 getSize ()
 
 isReadable ()
 
 isSeekable ()
 
 isWritable ()
 
 read ($length)
 
 rewind ()
 
 seek ($offset, $whence=SEEK_SET)
 
 tell ()
 
 write ($string)
 

Protected Member Functions

 createStream ()
 

Detailed Description

Lazily reads or writes to a file that is opened only after an IO operation take place on the stream.

Definition at line 10 of file LazyOpenStream.php.

Constructor & Destructor Documentation

◆ __construct()

GuzzleHttp\Psr7\LazyOpenStream::__construct (   $filename,
  $mode 
)
Parameters
string$filenameFile to lazily open
string$modefopen mode to use when opening the stream

Definition at line 30 of file LazyOpenStream.php.

Member Function Documentation

◆ createStream()

GuzzleHttp\Psr7\LazyOpenStream::createStream ( )
protected

Creates the underlying stream lazily when required.

Returns
StreamInterface

Definition at line 41 of file LazyOpenStream.php.

References GuzzleHttp\Psr7\stream_for(), and GuzzleHttp\Psr7\try_fopen().


The documentation for this class was generated from the following file: