protected function init($data)
{
if ($this->position > 0) {
return;
}
if ($this->showHeaders) {
fwrite($this->file, '<tr>');
foreach ($data as $header => $value) {
fwrite($this->file, sprintf('<th>%s</th>', $header));
}
fwrite($this->file, '</tr>');
++$this->position;
}
}