ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Psr\Http\Message\StreamFactoryInterface Interface Reference
+ Collaboration diagram for Psr\Http\Message\StreamFactoryInterface:

Public Member Functions

 createStream (string $content='')
 Create a new stream from a string. More...
 
 createStreamFromFile (string $filename, string $mode='r')
 Create a stream from an existing file. More...
 
 createStreamFromResource ($resource)
 Create a new stream from an existing resource. More...
 

Detailed Description

Definition at line 5 of file StreamFactoryInterface.php.

Member Function Documentation

◆ createStream()

Psr\Http\Message\StreamFactoryInterface::createStream ( string  $content = '')

Create a new stream from a string.

The stream SHOULD be created with a temporary resource.

Parameters
string$contentString content with which to populate the stream.
Returns
StreamInterface

◆ createStreamFromFile()

Psr\Http\Message\StreamFactoryInterface::createStreamFromFile ( string  $filename,
string  $mode = 'r' 
)

Create a stream from an existing file.

The file MUST be opened using the given mode, which may be any mode supported by the fopen function.

The $filename MAY be any string supported by fopen().

Parameters
string$filenameFilename or stream URI to use as basis of stream.
string$modeMode with which to open the underlying filename/stream.
Returns
StreamInterface
Exceptions

◆ createStreamFromResource()

Psr\Http\Message\StreamFactoryInterface::createStreamFromResource (   $resource)

Create a new stream from an existing resource.

The stream MUST be readable and may be writable.

Parameters
resource$resourcePHP resource to use as basis of stream.
Returns
StreamInterface

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