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

Class: StripLineComments

Source Location: /filters/StripLineComments.php

Class Overview

Reader
   |
   --FilterReader
      |
      --BaseFilterReader
         |
         --BaseParamFilterReader
            |
            --StripLineComments

This filter strips line comments.


Author(s):

Version:

  • $Revision: 557 $ $Date: 2009-08-29 15:54:38 +0200 (Sat, 29 Aug 2009) $

Copyright:

  • © 2003 seasonfive. All rights reserved

Implements interfaces:

Constants

Methods


Inherited Variables

Inherited Methods

Class: BaseParamFilterReader

BaseParamFilterReader::getParameters()
BaseParamFilterReader::setParameters()

Class: BaseFilterReader

BaseFilterReader::__construct()
Constructor used by Phing's introspection mechanism.
BaseFilterReader::eof()
Returns whether the end of file has been reached with input stream.
BaseFilterReader::getInitialized()
Returns the initialized status.
BaseFilterReader::getProject()
Returns the project this filter is part of.
BaseFilterReader::log()
Convenience method to support logging in filters.
BaseFilterReader::read()
Reads characters.
BaseFilterReader::readLine()
Reads a line of text ending with '\n' (or until the end of the stream).
BaseFilterReader::setInitialized()
Sets the initialized status.
BaseFilterReader::setProject()
Sets the project to work with.

Class: FilterReader

FilterReader::__construct()
FilterReader::close()
FilterReader::getResource()
FilterReader::read()
Read data from source.
FilterReader::reset()
FilterReader::setReader()
FilterReader::skip()

Class: Reader

Reader::close()
Close stream.
Reader::getResource()
Returns the filename, url, etc. that is being read from.
Reader::mark()
If supported, places a "marker" (like a bookmark) at current stream position.
Reader::markSupported()
Whether marking is supported.
Reader::read()
Read data from source.
Reader::ready()
Is stream ready for reading.
Reader::reset()
Reset the current position in stream to beginning or last mark (if supported).
Reader::skip()
Move stream position relative to current pos.

Class Details

[line 56]
This filter strips line comments.

Example:


   
   
   
   
   
 

Or:


   
   
   
   
   
 




Tags:

author:  <href="mailto:yl@seasonfive.com" a href="mailto:yl@seasonfive.com">Yannick Lecaillez</a>
author:  hans lellelid, hans@velum.net
version:  $Revision: 557 $ $Date: 2009-08-29 15:54:38 +0200 (Sat, 29 Aug 2009) $
copyright:  © 2003 seasonfive. All rights reserved
see:  BaseParamFilterReader
access:  public


[ Top ]


Class Methods


method chain [line 153]

void chain( $reader)




Implementation of:
ChainableReader::chain()
Returns a reader with the same configuration as this one, but filtering input from the specified reader.

Parameters:

Reader   $reader  

[ Top ]

method createComment [line 116]

void createComment( )



[ Top ]

method getComments [line 139]

void getComments( )



[ Top ]

method read [line 75]

mixed read( [ $len = null])

Returns stream only including lines from the original stream which don't start with any of the specified comment prefixes.



Tags:

return:  the resulting stream, or -1 if the end of the resulting stream has been reached.
throws:  IOException if the underlying stream throws an IOException during reading


Overrides BaseFilterReader::read() (Reads characters.)

Parameters:

   $len  

[ Top ]

method setComments [line 127]

void setComments( $lineBreaks)



Parameters:

   $lineBreaks  

[ Top ]


Class Constants

COMMENTS_KEY =  "comment"

[line 59]

Parameter name for the comment prefix.


[ Top ]



Documentation generated on Mon, 19 Oct 2009 10:52:05 +0200 by phpDocumentor 1.4.3