# classes/phing/filters/TabToSpaces.php

## \TabToSpaces
jump to top

Converts tabs to spaces.

Example:

Or:

Extends from
  \BaseParamFilterReader
Implements
  \ChainableReader
see
  \BaseParamFilterReader
author
  Yannick Lecaillez
author
  Hans Lellelid
copyright
  © 2003 seasonfive. All rights reserved
package
  phing.filters
version
  $Revision: 526 $

### Constants

`int DEFAULT_TAB_LENGTH = '8'`

The default tab length.

  int

`string TAB_LENGTH_KEY = 'tablength'`

Parameter name for the length of a tab.

  string

### Properties

`int $tabLength= '8'`

Tab length in this filter.

Default value `8` Details

Type
  int

### Methods

`_initialize( ) :`
Parses the parameters to set the tab length.
`chain( \Reader $reader ) : \Reader`
Creates a new TabsToSpaces using the passed in Reader for instantiation.
Parameters

Name | Type | Description
--- | --- | ---
$reader | \Reader | A Reader object providing the underlying stream. Must not be `null`.

Returns

Type | Description
--- | ---
\Reader |

`getTablength( ) : int`
Returns the tab length.
Returns

Type | Description
--- | ---
int |

`read( $len = null ) : \the`
Returns stream after converting tabs to the specified number of spaces.
Parameters

Name | Type | Description
--- | --- | ---
$len |  |

Returns

Type | Description
--- | ---
\the |

Details

exception
  IOException if the underlying stream throws an IOException during reading

`setTablength( int $tabLength ) :`
Sets the tab length.
Parameters

Name | Type | Description
--- | --- | ---
$tabLength | int | The number of spaces to be used when converting a tab.

Documentation was generated by DocBlox 0.13.1.