hellofresh / ausraster
此包已被弃用且不再维护。未建议替代包。
一组文档操作适配器。
v0.4
2016-12-09 16:20 UTC
Requires
- php: >=7.0
- easyframework/collections: ^6.0
Requires (Dev)
- phpunit/phpunit: ^5.4
Suggests
- phpoffice/phpexcel: Required to use the PHPExcel adapter
This package is not auto-updated.
Last update: 2024-03-02 16:21:48 UTC
README
Ausraster
与电子表格一起工作可能会让你(╯°□°)╯︵ ┻━┻。Ausraster 通过提供各种文档库的统一、合理的接口来结束这种挫败感。
┳━┳ ノ( ゜-゜ノ)
功能和路线图
- Excel 适配器(由 PHPExcel 提供)
- 完全符合 PSR-2 规范
- Composer / PSR-4 规范兼容
- 测试覆盖率
- 单元格格式化
- CSV 适配器
- 其他适配器即将推出!需要适配器?请自由贡献!
使用方法
安装
$ composer require hellofresh/ausraster
自带适配器
本身,Ausraster 并不做很多事情,因为它需要一个库作为接口。例如,如果我们包含 PHPExcel,我们可以利用 Ausraster 的电子表格接口。
$ composer require phpoffice/phpexcel
无论你使用什么电子表格适配器,Ausraster 都设计为具有相同简单、友好的接口。
require_once 'vendor/autoload.php'; use HelloFresh\Ausraster\Spreadsheet\Coordinate; use HelloFresh\Ausraster\Spreadsheet\PhpExcel\Document; $document = new Document; $worksheet = $document->createWorksheet(); $coordinate = new Coordinate('A', 1); $cell = $worksheet->getCellAt($coordinate); $cell->fill('Ausraster rules!'); $document->save('example.xlsx');
想了解更多,请查看 示例文件夹。
贡献
打算添加适配器或修复错误?谢谢!在这样做之前,请查看 CONTRIBUTING.md 以熟悉审查流程、行为准则等。