StringReader

Extends \Reader

Dummy class for reading from string of characters.

package

phing.system.io

Methods

__construct

__construct($string) 

Arguments

$string

Move stream position relative to current pos.

skip(int $n) 
inherited

Arguments

$n

int

Read data from source.

read(int $len = null) 
inherited abstract

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

Arguments

$len

int

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).

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

reset() 
inherited

Close stream.

close() 
inherited abstract
throws

if there is an error closing stream

open

open() 

Is stream ready for reading.

ready() : boolean
inherited

Response

boolean

Whether marking is supported.

markSupported() : boolean
inherited

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

Properties

_string

_string : string
var

Type(s)

string

mark

mark : int
var

Type(s)

int

currPos

currPos : int
var

Type(s)

int