PHP Interface Webmozart\Console\Api\IO\InputStream

Since: 1.0
Author: Bernhard Schussek ([email protected])
Mostrar archivo Open project: webmozart/console

Public Methods

Method Description
close ( ) Closes the stream.
isClosed ( ) : boolean Returns whether the stream is closed.
read ( integer $length ) : string Reads the given amount of characters from the stream.
readLine ( integer $length = null ) : string Reads a line from the stream.

Method Details

close() public method

Closes the stream.
public close ( )

isClosed() public method

Returns whether the stream is closed.
public isClosed ( ) : boolean
return boolean Returns `true` if the stream is closed.

read() public method

Reads the given amount of characters from the stream.
public read ( integer $length ) : string
$length integer The number of characters to read.
return string The characters read from the stream.

readLine() public method

Reads a line from the stream.
public readLine ( integer $length = null ) : string
$length integer The maximum number of characters to read. If `null`, all characters up to the first newline are returned.
return string The characters read from the stream.