<?php

declare(strict_types=1);

namespace apexl\Io\modules\tabulator\Etl\Loader;

use Wizaplace\Etl\Loaders\Loader;
use Wizaplace\Etl\Row;

class ArrayLoader extends Loader
{
    /** @noinspection PhpGetterAndSetterCanBeReplacedWithPropertyHooksInspection */
    private array $data = [];

    public function load(Row $row): void
    {
        $this->data[] = $row->toArray();
    }

    public function getData(): array
    {
        return $this->data;
    }
}
