gpupo / brazilian-banking-automation
此包已被放弃且不再维护。未建议替代包。
CNAB 工具
2.0.0
2020-12-10 01:12 UTC
Requires
- php: ^8.0
- andersondanilo/cnab_php: ^1.3
- gpupo/common-sdk: ^6.3 || dev-master
Requires (Dev)
This package is auto-updated.
Last update: 2024-05-07 12:48:27 UTC
README
安装
composer require gpupo/brazilian-banking-automation
使用方法
模式 1 - 实例化对象
<?php $headerAttributes = [ 'tipo_de_registro' => '0', 'codigo_de_retorno' => '2', //...all required fields ]; $trailerAttributes = [ 'tipo_de_registro' => '9', 'codigo_de_retorno' => '2', //...all required fields ]; $itemAttributes = [ 'tipo_de_registro' => '001', 'codigo_de_inscricao' => '1', //...all required fields ]; $headerObject = new Header($headerAttributes); $trailerObject = new Trailer($trailerAttributes); $itemObject = new Item($itemAttributes); $file = new File($headerObject, $trailerObject); $file->addItem($itemObject); $file->getContent(); // content of file //...
模式 2 - 使用工厂
<?php $factory = new Cnab400\Factory(); $item = $factory->factoryReturnItem($itemAttributes); $file = $factory->factoryfile($headerAttributes, $trailerAttributes); $file->addItem(item); $file->getContent(); // content of file
控制台
生成 Doctrine Yaml 文件
./bin/brazilian-banking-automation
使用要求
- PHP >= 7.1
- Composer 依赖管理器
此组件不是一个独立的应用程序,其目的是作为库使用。其部署应由经验丰富的开发者完成。
这不是一个插件!
命令行模式下工作的选项仅用于开发模式下的调试。
最重要的文档在单元测试中。如果您无法阅读单元测试,我建议不要使用这个库。
版权和许可证
此组件遵循MIT 许可证
有关版权和许可证的信息,您应阅读随源代码一起分发的许可证文件。
许可证摘要
要求
- 许可证和版权声明
允许
- 商业用途
- 修改
- 分发
- 再许可
禁止
- 保证责任