StripLineComments::setComments PHP Méthode

setComments() public méthode

* Sets the list of comment prefixes to strip.
public setComments ( $lineBreaks )
    function setComments($lineBreaks)
    {
        if (!is_array($lineBreaks)) {
            throw new Exception("Excpected 'array', got something else");
        }
        $this->_comments = $lineBreaks;
    }

Usage Example

 function chain(Reader $reader)
 {
     $newFilter = new StripLineComments($reader);
     $newFilter->setComments($this->getComments());
     $newFilter->setInitialized(true);
     $newFilter->setProject($this->getProject());
     return $newFilter;
 }