A class to represent the nested 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

 Methods

Construct a new PDOSQLExecFormatterElement with parent task.

__construct(\PDOSQLExecTask $parentTask) 

Parameters

$parentTask

\PDOSQLExecTask

Supports nested <param> element (for custom formatter classes).

createParam() : \Parameter

Returns

Whether output should be appended to file.

getAppend() : boolean

Returns

boolean

Gets the formatter that has been configured based on this element.

getFormatter() : \PDOResultFormatter

Get the output file.

getOutfile() : \PhingFile

Returns

Return whether to write formatter results to file.

getUseFile() : boolean

Returns

boolean

Configures wrapped formatter class with any attributes on this element.

prepare() 

whether output should be appended to or overwrite an existing file.

setAppend(boolean $append) 

Defaults to false.

Parameters

$append

boolean

Set classname for a custom formatter (must extend PDOResultFormatter).

setClassName(string $className) 

Parameters

$className

string

Sets the column delimiter.

setColdelim(string $v) 

Parameters

$v

string

Set the DOM document encoding.

setEncoding(string $v) 

Parameters

$v

string

setFormatOutput()

setFormatOutput(boolean $v) 

Parameters

$v

boolean

Sets the output file for the formatter results.

setOutfile(\PhingFile $outfile) 

Parameters

$outfile

Sets the row delimiter.

setRowdelim(string $v) 

Parameters

$v

string

Print headers for result sets from the statements; optional, default true.

setShowheaders(boolean $showheaders) 

Parameters

$showheaders

boolean

Sets the formatter type.

setType(string $type) 

Parameters

$type

string

Set whether to write formatter results to file.

setUseFile(boolean $useFile) 

Parameters

$useFile

boolean

Gets a default output writer for this task.

getDefaultOutput() : \Writer

Returns

Gets a configured output writer.

getOutputWriter() : \Writer

Returns

 Properties

 

$append : boolean
 

$coldelimiter : string

Defaults to ','

 

$encoding : string
 

$formatoutput : boolean
 

$formatter : \PDOResultFormatter
 

$formatterParams : array
 

$outfile : \PhingFile
 

$parentTask : \PDOSQLExecTask
 

$rowdelimiter : string

Defaults to PHP_EOL.

 

$showheaders : boolean
 

$type : string
 

$useFile : boolean