ConsoleReader

Extends \Reader

Convenience class for reading console input.

author

Hans Lellelid [email protected]

author

Matthew Hershberger [email protected]

version

$Id: d8820d6866d4cac9ec4a9a15b4c06a94abf2fa97 $

package

phing.system.io

Methods

Close stream.

close() 
inherited abstract
Throws
\IOException

if there is an error closing stream

Whether eof has been reached with stream.

eof() : boolean

Response

boolean

Returns the filename, url, etc. that is being read from.

getResource() : string
inherited abstract

This is critical for, e.g., ExpatParser's ability to know the filename that is throwing an ExpatParserException, etc.

Response

string

If supported, places a "marker" (like a bookmark) at current stream position.

mark() 
inherited

A subsequent call to reset() will move stream position back to last marker (if supported).

Whether marking is supported.

markSupported() : boolean
inherited

Response

boolean

open

open() 

Read data from source.

read(integer $len = null) 
inherited abstract

If length is specified, then only that number of chars is read, otherwise stream is read until EOF.

Arguments

$len

integer

readLine

readLine() : string

Response

string

Is stream ready for reading.

ready() : boolean
inherited

Response

boolean

Reset the current position in stream to beginning or last mark (if supported).

reset() 
inherited

Move stream position relative to current pos.

skip(integer $n) 
inherited

Arguments

$n

integer