classes/phing/filters/StripPhpComments.php
\StripPhpComments
This is a Php comment and string stripper reader that filters those lexical tokens out for purposes of simple Php parsing.
(if you have more complex Php parsing needs, use a real lexer). Since this class heavily relies on the single char read function, you are reccomended to make it work on top of a buffered reader.
- Extends from
- \BaseFilterReader
- Implements
- \ChainableReader
- see
- \FilterReader
- access
- public
- author
- Yannick Lecaillez
- author
- hans lellelid, hans@velum.net
- package
- phing.filters
- version
- $Revision: 526 $ $Date: 2009-08-11 14:11:17 +0200 (Tue, 11 Aug 2009) $
Properties

boolean
$_inString= 'false'
Whether or not the parser is currently in the middle of a string literal.
falseDetails- Type
- boolean
Methods

chain(
\reader $reader
)
:
\aCreates a new StripPhpComments using the passed in
Reader for instantiation.
| Name | Type | Description |
|---|---|---|
| $reader | \reader | A Reader object providing the underlying stream. Must not be |
| Type | Description |
|---|---|
| \a |

read(
$len
=
null
)
:
\theReturns the stream without Php comments.
| Name | Type | Description |
|---|---|---|
| $len |
| Type | Description |
|---|---|
| \the |
- throws
- if the underlying stream throws an IOException during reading