. */ require_once 'phing/system/io/PhingFile.php'; /** * Abstract * * @author Hans Lellelid * @package phing.tasks.ext.pdo * @since 2.3.0 */ abstract class PDOResultFormatter { /** * Output writer. * * @var Writer */ protected $out; /** * Sets the output writer. * * @param Writer $out */ public function setOutput(Writer $out) { $this->out = $out; } /** * Gets the output writer. * * @return Writer */ public function getOutput() { return $this->out; } /** * Gets the preferred output filename for this formatter. * @return string */ abstract public function getPreferredOutfile(); /** * Perform any initialization. */ public function initialize() { } /** * Processes a specific row from PDO result set. * * @param array $row Row of PDO result set. */ abstract public function processRow($row); /** * Perform any final tasks and Close the writer. */ public function close() { $this->out->close(); } }