classes/phing/tasks/ext/pdo/PDOSQLExecFormatterElement.php
\PDOSQLExecFormatterElement
A class to represent the nested <formatter> element for PDO SQL results.
This class is inspired by the similarly-named class in the PHPUnit tasks.
- author
- Hans Lellelid
- package
- phing.tasks.ext.pdo
- since
- 2.3.0
Properties

boolean
$append= 'false'
Append to an existing file or overwrite it?
falseDetails- Type
- boolean

array
$formatterParams= 'array'
Parameters for a custom formatter.
Parameter[]arrayDetails- Type
- array

string
$rowdelimiter= 'PHP_EOL'
Row delimiter.
Defaults to PHP_EOL.
PHP_EOLDetails- Type
- string

string
$type= ''
The type of the formatter (used for built-in formatter classes).
- Type
- string
Methods

__construct(
\PDOSQLExecTask $parentTask
)
:
Construct a new PDOSQLExecFormatterElement with parent task.
| Name | Type | Description |
|---|---|---|
| $parentTask | \PDOSQLExecTask |

createParam(
)
:
\ParameterSupports nested element (for custom formatter classes).
| Type | Description |
|---|---|
| \Parameter |

getDefaultOutput(
)
:
\WriterGets a default output writer for this task.
| Type | Description |
|---|---|
| \Writer |

getFormatter(
)
:
\PDOResultFormatterGets the formatter that has been configured based on this element.
| Type | Description |
|---|---|
| \PDOResultFormatter |

getUseFile(
)
:
booleanReturn whether to write formatter results to file.
| Type | Description |
|---|---|
| boolean |

setAppend(
boolean $append
)
:
whether output should be appended to or overwrite
an existing file. Defaults to false.
| Name | Type | Description |
|---|---|---|
| $append | boolean |

setClassName(
string $className
)
:
Set classname for a custom formatter (must extend PDOResultFormatter).
| Name | Type | Description |
|---|---|---|
| $className | string |

setEncoding(
string $v
)
:
Set the DOM document encoding.
| Name | Type | Description |
|---|---|---|
| $v | string |

setOutfile(
$outfile
)
:
Sets the output file for the formatter results.
| Name | Type | Description |
|---|---|---|
| $outfile |

setShowheaders(
boolean $showheaders
)
:
Print headers for result sets from the
statements; optional, default true.
| Name | Type | Description |
|---|---|---|
| $showheaders | boolean |