# classes/phing/tasks/ext/phpmd/PHPMDFormatterElement.php

## \PHPMDFormatterElement
jump to top

A wrapper for the implementations of PHPMDResultFormatter.

author
  Benjamin Schultz
package
  phing.tasks.ext.phpmd
since
  2.4.1
version
  $Id: PHPMDFormatterElement.php 755 2010-03-24 20:19:08Z bschultz $

### Properties

`\PHPMDResultFormatter $formatter= 'null'`

Default value `null` Details

Type
  \PHPMDResultFormatter

`\PhingFile $outfile= 'null'`

Output file for formatter.

Default value `null` Details

Type
  \PhingFile

`string $type= ''`

The type of the formatter.

Details

Type
  string

`boolean $useFile= 'true'`

Whether to use file (or write output to phing log).

Default value `true` Details

Type
  boolean

### Methods

`getOutfile( ) : \PhingFile`
Get the output file.
Returns

Type | Description
--- | ---
\PhingFile |

`getRenderer( ) : \PHP_PMD_AbstractRenderer`
Creates a report renderer instance based on the formatter type.
Returns

Type | Description
--- | ---
\PHP_PMD_AbstractRenderer |

Details

throws
  When the specified renderer does not exist.

`getType( ) : string`
Get the formatter type
Returns

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

`getUseFile( ) : boolean`
Return whether to write formatter results to file or not.
Returns

Type | Description
--- | ---
boolean |

`setOutfile( \PhingFile $outfile ) : void`
Sets the output file for the formatter results.
Parameters

Name | Type | Description
--- | --- | ---
$outfile | \PhingFile | The output file

`setType( string $type ) : void`
Sets the formatter type.
Parameters

Name | Type | Description
--- | --- | ---
$type | string | Type of the formatter

`setUseFile( boolean $useFile ) : void`
Set whether to write formatter results to file or not.
Parameters

Name | Type | Description
--- | --- | ---
$useFile | boolean | True or false.

Documentation was generated by DocBlox 0.13.1.