system/io/ConsoleReader.php

Show: inherited
Table of Contents

Convenience class for reading console input.

Author
Hans Lellelid  
Author
Matthew Hershberger  
Package
phing.system.io  
Version
$Id$  

\ConsoleReader

Package: phing\system\io

Convenience class for reading console input.

Parent(s)
\Reader
Author
Hans Lellelid  
Author
Matthew Hershberger  
Version
$Id$  

Methods

methodpublicclose( ) : void

Close stream.

Throws
Exception Description
\IOException if there is an error closing stream
methodpubliceof( ) : boolean

Whether eof has been reached with stream.

Returns
Type Description
boolean
methodpublicgetResource( ) : string

Returns path to file we are reading.

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

Returns
Type Description
string
methodpublicmark( ) : void
inherited

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

Inherited from: \Reader::mark()

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

methodpublicmarkSupported( ) : boolean
inherited

Whether marking is supported.

Inherited from: \Reader::markSupported()
Returns
Type Description
boolean
methodpublicopen( ) : void

methodpublicread( int $len = null ) : string

Read data from source.

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

Parameters
Name Type Description
$len int

Num chars to read.

Returns
Type Description
string chars read or -1 if eof.
methodpublicreadLine( ) : void

methodpublicready( ) : boolean
inherited

Is stream ready for reading.

Inherited from: \Reader::ready()
Returns
Type Description
boolean
methodpublicreset( ) : void
inherited

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

Inherited from: \Reader::reset()
methodpublicskip( int $n ) : void
inherited

Move stream position relative to current pos.

Inherited from: \Reader::skip()
Parameters
Name Type Description
$n int
Documentation was generated by DocBlox 0.18.1.