system/io/ConsoleReader.php
Convenience class for reading console input.
- Author
- Hans Lellelid
- Author
- Matthew Hershberger
- Package
- phing.system.io
- Version
- $Id$
\ConsoleReader
Package: phing\system\io
Returns
Parameters
Returns
Convenience class for reading console input.
- Parent(s)
- \Reader
- Author
- Hans Lellelid
- Author
- Matthew Hershberger
- Version
- $Id$
Methods


close(
)
:
void
Close stream.
Throws
Exception | Description |
---|---|
\IOException | if there is an error closing stream |


getResource(
)
:
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.
Type | Description |
---|---|
string |


mark(
)
:
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).


read(
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.
Name | Type | Description |
---|---|---|
$len | int | Num chars to read. |
Type | Description |
---|---|
string | chars read or -1 if eof. |


reset(
)
:
void
inherited
Reset the current position in stream to beginning or last mark (if supported).
Inherited from: \Reader::reset()