Stream

Stream
implements Psr\Http\Message\StreamInterface
Methods Summary
public
# __construct( resource $resource )
Constructor of the class
public
# isResourceable( )
Checks if the stream is resourceable
public
# detach( )
Detaches a resource from the stream Returns NULL if the stream already without a resource.

Implementation of

public
public
# eof( )
Checks if the end of the stream is reached

link

Implementation of

public
# tell( )
Gets the stream pointer position

link

Implementation of

public
# isSeekable( )
Checks if the stream is seekable

Implementation of

public
# rewind( )
Moves the stream pointer to begining

link

Implementation of

public
# seek( int $offset , int $whence = NULL )
Moves the stream pointer to the given position

link

Implementation of

public
# isWritable( )
Checks if the stream is writable

Implementation of

public
# write( string $string )
Writes the given string to the stream Returns the number of bytes written to the stream.

link

Implementation of

public
# truncate( int $length = 0 )
Truncates the stream to the given length

link

public
# isReadable( )
Checks if the stream is readable

Implementation of

public
# read( int $length )
Reads the given number of bytes from the stream

link

Implementation of

public
public
public
# getSize( )
Gets the stream size Returns NULL if the stream without a resource, or if the stream size cannot be determined.

link

Implementation of

public
# toString( )
Converts the stream to string This method SHOULD NOT throw an exception.
public
# __toString( )
Converts the object to string

Implementation of

Properties Summary
protected resource $resource
Resource of the stream
# NULL