classes/phing/filters/TabToSpaces.php

\TabToSpaces

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

Constantint  DEFAULT_TAB_LENGTH = '8'

The default tab length.

int
Constantstring  TAB_LENGTH_KEY = 'tablength'

Parameter name for the length of a tab.

string

Properties

Propertyprivateint  $tabLength= '8'

Tab length in this filter.

Default value8Details
Type
int

Methods

methodprivate  _initialize( ) :
Parses the parameters to set the tab length.
methodpublic  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
methodpublic  getTablength( ) : int
Returns the tab length.
Returns
Type Description
int
methodpublic  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
methodpublic  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.