PHP Class StripPhpComments, symfony-1.4

(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.
See also: FilterReader
Author: hans lellelid, [email protected]
Inheritance: extends BaseFilterReader, implements ChainableReader
Mostrar archivo Open project: vjousse/symfony-1.4 Class Usage Examples

Public Methods

Method Description
chain ( Reader $reader ) : a Creates a new StripPhpComments using the passed in Reader for instantiation.
read ( $len = null ) : the Returns the stream without Php comments.
readChar ( ) * Returns the next character in the filtered stream, not including Php comments.

Method Details

chain() public method

Creates a new StripPhpComments using the passed in Reader for instantiation.
public chain ( Reader $reader ) : a
$reader Reader
return a new filter based on this configuration, but filtering the specified reader

read() public method

Returns the stream without Php comments.
public read ( $len = null ) : the
return the resulting stream, or -1 if the end of the resulting stream has been reached

readChar() public method

* Returns the next character in the filtered stream, not including Php comments.
Deprecation:
public readChar ( )