# classes/phing/filters/TidyFilter.php

## \TidyFilter
jump to top

This filter uses the bundled-with-PHP Tidy extension to filter input.

<

p> Example:<br/>

Extends from
  \BaseParamFilterReader
Implements
  \ChainableReader
author
  Hans Lellelid
copyright
  © 2003 seasonfive. All rights reserved
package
  phing.filters
version
  $Revision: 552 $ $Date: 2009-08-29 14:18:13 +0200 (Sat, 29 Aug 2009) $

### Properties

`array $configParameters= 'array'`

Parameter[]
Default value `array` Details

Type
  array

`string $encoding= 'utf8'`

Encoding of resulting document.
Default value `utf8` Details

Type
  string

### Methods

`_initialize( ) :`
Initializes any parameters (e.g. config options).

This method is only called when this filter is used through a tag in build file.

`chain( \reader $reader ) : \a`
Creates a new TidyFilter 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
--- | ---
\a |

`createConfig( ) : \Parameter`
Adds a element (which is a Parameter).
Returns

Type | Description
--- | ---
\Parameter |

`getDistilledConfig( ) : array`
Converts the Parameter objects being used to store configuration into a simle assoc array.
Returns

Type | Description
--- | ---
array |

`read( $len = null ) : \the`
Reads input and returns Tidy-filtered output.
Parameters

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

Returns

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

Details

throws
  if the underlying stream throws an IOException during reading

`setConfigParameters( array $params ) :`
Sets the config params.
Parameters

Name | Type | Description
--- | --- | ---
$params | array | Parameter[]

Details

see
  \chain()

`setEncoding( string $v ) :`
Set the encoding for resulting (X)HTML document.
Parameters

Name | Type | Description
--- | --- | ---
$v | string |

Documentation was generated by DocBlox 0.13.1.