PHP PSR

StreamInterface extends StreamInterface

Describes Stream interface.

Table of Contents

Methods

getResource()  : object|null
Retrieve resource of the stream.
getUri()  : string
Retrieve uri of the stream metadata.
withFile()  : static
Return an instance with file stream.
withMemory()  : static
Return an instance with memory stream.
withPipe()  : static
Return an instance with pipe stream.
withTemp()  : static
Return an instance with temporary stream.

Methods

getResource()

Retrieve resource of the stream.

public getResource() : object|null
Return values
object|null

getUri()

Retrieve uri of the stream metadata.

public getUri() : string
Return values
string

withFile()

Return an instance with file stream.

public withFile(string $Filename[, string $Mode = "w+" ]) : static
Parameters
$Filename : string

The filename.

$Mode : string = "w+"

The mode parameter specifies the type of access you require to the stream.

Return values
static

withMemory()

Return an instance with memory stream.

public withMemory([string $Mode = "w+" ]) : static
Parameters
$Mode : string = "w+"

The mode parameter specifies the type of access you require to the stream.

Return values
static

withPipe()

Return an instance with pipe stream.

public withPipe(string $Command[, string $Mode = "w+" ]) : static
Parameters
$Command : string

The command.

$Mode : string = "w+"

The mode. Either 'r' for reading, or 'w' for writing.

Return values
static

withTemp()

Return an instance with temporary stream.

public withTemp([string $Mode = "w+" ]) : static
Parameters
$Mode : string = "w+"

The mode parameter specifies the type of access you require to the stream.

Return values
static

        
On this page

Search results