mhmdmanssour / fast-csv
快速、内存轻量级的CSV导入/导出器,提供更好的测试体验
v0.0.1
2024-05-09 14:50 UTC
Requires
- php: ^8.1
- mikey179/vfsstream: ^1.6
Requires (Dev)
- laravel/pint: ^1.0
- phpunit/phpunit: ^10.3.2
- spatie/ray: ^1.28
- symfony/var-dumper: ^7.0
This package is auto-updated.
Last update: 2024-09-05 07:58:15 UTC
README
快速、内存轻量级的CSV导入/导出器,提供更好的测试体验
安装
您可以通过composer安装此包
composer require mohammedmanssour/fast-csv
使用方法
将数据导出到csv文件
FastCSV::exporter() ->header(["One", "Two", "Three"]) // data can be an array or any object that implements that iterator pattern ->data([ ["Line 1: One", "Line 1: Two", "Line 1: Three"], ["Line 2: One", "Line 2: Two", "Line 2: Three"], ]) ->toFile(__DIR__ . '/some.csv') // the target file ->export();
测试
composer test