BaseFilterReader

Extends \FilterReader

Base class for core filter readers.

author

Yannick Lecaillez

version

$Id$

access

public

see
package

phing.filters

Methods

__construct

__construct(\Reader $in = null) 
inherited

Arguments

$in

\Reader

Returns the initialized status.

getInitialized() : boolean

Response

boolean

whether or not the filter is initialized

Sets the initialized status.

setInitialized(boolean $initialized) 

Arguments

$initialized

boolean

Whether or not the filter is initialized.

Sets the project to work with.

setProject(object $project) 

Arguments

$project

object

The project this filter is part of. Should not be null.

Returns the project this filter is part of.

getProject() : object

Response

object

The project this filter is part of

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

Reads a line of text ending with '\n' (or until the end of the stream).

readLine() : \the

The returned String retains the '\n'.

throws

if the underlying reader throws one during reading

Response

\the

line read, or null if the end of the stream has already been reached

Returns whether the end of file has been reached with input stream.

eof() : boolean

Response

boolean

Convenience method to support logging in filters.

log(string $msg, int $level = \Project::MSG_INFO) 

Arguments

$msg

string

Message to log.

$level

int

Priority level.

setReader

setReader(\Reader $in) 
inherited

Arguments

$in

\Reader

Move stream position relative to current pos.

skip(int $n) 
inherited

Arguments

$n

int

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

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

Is stream ready for reading.

ready() : boolean
inherited

Response

boolean

Properties

Have the parameters passed been interpreted?

initialized : 

The Phing project this filter is part of.

project : 

in

in : \Reader
inherited
var

Type(s)

\Reader