# classes/phing/filters/StripLineBreaks.php

## \StripLineBreaks
jump to top

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

`string DEFAULT_LINE_BREAKS = '\r\n'`

Default line-breaking characters.

  string

`string LINES_BREAKS_KEY = 'linebreaks'`

Parameter name for the line-breaking characters parameter.

  string

### Properties

`string $_lineBreaks= '\r\n'`

The characters that are recognized as line breaks.

Default value`\r\n` Details

Type
  string

### Methods

`_initialize( ) :`
Parses the parameters to set the line-breaking characters.
`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 |

`getLineBreaks( ) : string`
Gets the line-breaking characters.
Returns

Type | Description
--- | ---
string |

`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

`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.