public static function putContents($filename, array $data)
    {
        $csv = new static();

        foreach ($data as $row) {
            $csv->addRow($row);
        }

        $csv->write($filename);
    }