Flush buffer, optionally tidy up HTML, and close output if it's not to a php stream
public function flush() {
if ($this->out && strncmp($this->outTarget, 'php://', 6) !== 0) {
fclose($this->out);
}
if ($this->printsHTML === TRUE && $this->outTarget !== NULL && strpos($this->outTarget, 'php://') !== 0 && strpos($this->outTarget, 'socket://') !== 0 && extension_loaded('tidy')) {
file_put_contents($this->outTarget, tidy_repair_file($this->outTarget, array(
'indent' => TRUE,
'wrap' => 0,
), 'utf8'));
}
}