phing-filters-util
[ class tree: phing-filters-util ] [ index: phing-filters-util ] [ all elements ]

Class: ChainReaderHelper

Source Location: /filters/util/ChainReaderHelper.php

Class Overview


Process a FilterReader chain.


Author(s):

Version:

  • $Revision: 526 $ $Date: 2009-08-11 14:11:17 +0200 (Tue, 11 Aug 2009) $

Methods



Class Details

[line 68]
Process a FilterReader chain.

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 :

<filterchain> <stripphpcomments /> <linecontains> <contains value="foo"> </linecontains> <tabtospaces tablength="8" /> </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.




Tags:

author:  <href="mailto:yl@seasonfive.com" a href="mailto:yl@seasonfive.com">Yannick Lecaillez</a>
version:  $Revision: 526 $ $Date: 2009-08-11 14:11:17 +0200 (Tue, 11 Aug 2009) $
access:  public


[ Top ]


Class Methods


method getAssembledReader [line 121]

void getAssembledReader( )



[ Top ]

method getProject [line 99]

void getProject( )



[ Top ]

method setBufferSize [line 107]

void setBufferSize( $size)



Parameters:

   $size  

[ Top ]

method setFilterChains [line 114]

void setFilterChains( &$fchain)



Parameters:

   &$fchain  

[ Top ]

method setPrimaryReader [line 85]

void setPrimaryReader( $reader)



Parameters:

Reader   $reader  

[ Top ]

method setProject [line 92]

void setProject( $project)



Parameters:

Project   $project  

[ Top ]


Documentation generated on Mon, 19 Oct 2009 10:50:30 +0200 by phpDocumentor 1.4.3