PHP Class StripLineComments, symfony-1.4

Example:

  
  
  
  
  
Or:

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

Méthodes publiques

Méthode 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

Méthode Description
_initialize ( ) * Parses the parameters to set the comment prefixes.

Method Details

chain() public méthode

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

createComment() public méthode

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

getComments() public méthode

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

read() public méthode

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
Résultat mixed the resulting stream, or -1 if the end of the resulting stream has been reached.

setComments() public méthode

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