# PHPMDFormatterElement

A wrapper for the implementations of PHPMDResultFormatter.

package | phing.tasks.ext.phpmd
author | Benjamin Schultz bschultz@proqrent.de
version | $Id: fa23de508582a5bc1d36fab6153d64df333099c6 $
since | 2.4.1

### Methods

## Get the output file.

    getOutfile() : \PhingFile

### Response

`\PhingFile`

## Creates a report renderer instance based on the formatter type.

    getRenderer() : \PHP_PMD_AbstractRenderer

throws | When the specified renderer does not exist.

### Response

`\PHP_PMD_AbstractRenderer`

## Get the formatter type

    getType() : string

### Response

`string`

## Return whether to write formatter results to file or not.

    getUseFile() : boolean

### Response

`boolean`

## Sets the output file for the formatter results.

    setOutfile(\PhingFile $outfile)

### Arguments

#### $outfile

`\PhingFile`

The output file

## Sets the formatter type.

    setType(string $type)

throws |

### Arguments

#### $type

`string`

Type of the formatter

## Set whether to write formatter results to file or not.

    setUseFile(boolean $useFile)

### Arguments

#### $useFile

`boolean`

True or false.

### Properties

## formatter

    formatter : \PHPMDResultFormatter

var |

### Type(s)

`\PHPMDResultFormatter`

## The type of the formatter.

    type : string

var |

### Type(s)

`string`

## className

    className : string

var |

### Type(s)

`string`

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

    useFile : boolean

var |

### Type(s)

`boolean`

## Output file for formatter.

    outfile : \PhingFile

var |

### Type(s)

`\PhingFile`