PHP Class StripLineComments, symfony-1.4

Example:

  
  
  
  
  
Or:

  
  
  
  
  
See also: BaseParamFilterReader
Author: hans lellelid, [email protected]
Inheritance: extends BaseParamFilterReader, implements ChainableReader
Datei anzeigen Open project: vjousse/symfony-1.4 Class Usage Examples

Public Methods

Method Description
chain ( Reader $reader ) * Creates a new StripLineComments using the passed in Reader for instantiation.
createComment ( ) * Adds a comment element to the list of prefixes.
getComments ( ) * Returns the list of comment prefixes to strip.
read ( $len = null ) : mixed Returns stream only including lines from the original stream which don't start with any of the specified comment prefixes.
setComments ( $lineBreaks ) * Sets the list of comment prefixes to strip.

Private Methods

Method Description
_initialize ( ) * Parses the parameters to set the comment prefixes.

Method Details

chain() public method

* Creates a new StripLineComments using the passed in Reader for instantiation.
public chain ( Reader $reader )
$reader Reader

createComment() public method

* Adds a comment element to the list of prefixes.
public createComment ( )

getComments() public method

* Returns the list of comment prefixes to strip.
public getComments ( )

read() public method

Returns stream only including lines from the original stream which don't start with any of the specified comment prefixes.
public read ( $len = null ) : mixed
return mixed the resulting stream, or -1 if the end of the resulting stream has been reached.

setComments() public method

* Sets the list of comment prefixes to strip.
public setComments ( $lineBreaks )