Sonata\Exporter\Writer\XlsWriter::init PHP Метод

init() защищенный Метод

protected init ( $data ) : array
$data
Результат array mixed
    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;
        }
    }