classes/phing/filters/StripLineBreaks.php

\StripLineBreaks

Filter to flatten the stream to a single line.

Example:

Or:

Extends from
\BaseParamFilterReader
Implements
\ChainableReader
see
\BaseParamFilterReader
access
public
author
Yannick Lecaillez
author
hans lellelid, hans@velum.net
copyright
© 2003 seasonfive. All rights reserved
package
phing.filters
version
$Revision: 526 $ $Date: 2009-08-11 14:11:17 +0200 (Tue, 11 Aug 2009) $

Constants

Constantstring  DEFAULT_LINE_BREAKS = '\r\n'

Default line-breaking characters.

string
Constantstring  LINES_BREAKS_KEY = 'linebreaks'

Parameter name for the line-breaking characters parameter.

string

Properties

Propertyprivatestring  $_lineBreaks= '\r\n'

The characters that are recognized as line breaks.

Default value\r\nDetails
Type
string

Methods

methodprivate  _initialize( ) :
Parses the parameters to set the line-breaking characters.
methodpublic  chain( object $reader ) : object
Creates a new StripLineBreaks using the passed in Reader for instantiation.
Parameters
Name Type Description
$reader object

A Reader object providing the underlying stream. Must not be null.

Returns
Type Description
object
methodpublic  getLineBreaks( ) : string
Gets the line-breaking characters.
Returns
Type Description
string
methodpublic  read(  $len = null ) : mixed
Returns the filtered stream, only including characters not in the set of line-breaking characters.
Parameters
Name Type Description
$len
Returns
Type Description
mixed
Details
exception
IOException if the underlying stream throws an IOException during reading
methodpublic  setLineBreaks( string $lineBreaks ) :
Sets the line-breaking characters.
Parameters
Name Type Description
$lineBreaks string

A String containing all the characters to be considered as line-breaking.

Documentation was generated by DocBlox 0.13.1.