PHP Class ChainReaderHelper, symfony-1.4

Here, the interesting method is 'getAssembledReader'. The purpose of this one is to create a simple Reader object which apply all filters on another primary Reader object. For example : In copyFile (phing.util.FileUtils) the primary Reader is a FileReader object (more accuratly, a BufferedReader) previously setted for the source file to copy. So, consider this filterchain : getAssembledReader will return a Reader object wich read on each of these filters. Something like this : ('->' = 'which read data from') : [TABTOSPACES] -> [LINECONTAINS] -> [STRIPPHPCOMMENTS] -> [FILEREADER] (primary reader) So, getAssembledReader will return the TABTOSPACES Reader object. Then each read done with this Reader object will follow this path. Hope this explanation is clear :) TODO: Implement the classPath feature.
Show file Open project: vjousse/symfony-1.4 Class Usage Examples

Public Methods

Method Description
getAssembledReader ( ) * Assemble the reader
getProject ( ) * Get the project
setBufferSize ( $size ) * Sets the buffer size to be used. Defaults to 8192, if this method is not invoked.
setFilterChains ( &$fchain ) * Sets the collection of filter reader sets
setPrimaryReader ( Reader $reader ) * Sets the primary reader
setProject ( Project $project ) * Set the project to work with

Method Details

getAssembledReader() public method

* Assemble the reader
public getAssembledReader ( )

getProject() public method

* Get the project
public getProject ( )

setBufferSize() public method

* Sets the buffer size to be used. Defaults to 8192, if this method is not invoked.
public setBufferSize ( $size )

setFilterChains() public method

* Sets the collection of filter reader sets
public setFilterChains ( &$fchain )

setPrimaryReader() public method

* Sets the primary reader
public setPrimaryReader ( Reader $reader )
$reader Reader

setProject() public method

* Set the project to work with
public setProject ( Project $project )
$project Project