PHP Class Zend\Diactoros\Stream

Inheritance: implements Psr\Http\Message\StreamInterface
Mostra file Open project: zendframework/zend-diactoros Class Usage Examples

Protected Properties

Property Type Description
$resource resource
$stream string | resource

Public Methods

Method Description
__construct ( string | resource $stream, string $mode = 'r' )
__toString ( )
attach ( string | resource $resource, string $mode = 'r' ) Attach a new stream/resource to the instance.
close ( )
detach ( )
eof ( )
getContents ( )
getMetadata ( $key = null )
getSize ( )
isReadable ( )
isSeekable ( )
isWritable ( )
read ( $length )
rewind ( )
seek ( $offset, $whence = SEEK_SET )
tell ( )
write ( $string )

Private Methods

Method Description
setStream ( string | resource $stream, string $mode = 'r' ) Set the internal stream resource.

Method Details

__construct() public method

public __construct ( string | resource $stream, string $mode = 'r' )
$stream string | resource
$mode string Mode with which to open stream

__toString() public method

public __toString ( )

attach() public method

Attach a new stream/resource to the instance.
public attach ( string | resource $resource, string $mode = 'r' )
$resource string | resource
$mode string

close() public method

public close ( )

detach() public method

public detach ( )

eof() public method

public eof ( )

getContents() public method

public getContents ( )

getMetadata() public method

public getMetadata ( $key = null )

getSize() public method

public getSize ( )

isReadable() public method

public isReadable ( )

isSeekable() public method

public isSeekable ( )

isWritable() public method

public isWritable ( )

read() public method

public read ( $length )

rewind() public method

public rewind ( )

seek() public method

public seek ( $offset, $whence = SEEK_SET )

tell() public method

public tell ( )

write() public method

public write ( $string )

Property Details

$resource protected_oe property

protected resource $resource
return resource

$stream protected_oe property

protected string|resource $stream
return string | resource