farmpublic/daplos-parser-bundle
最新稳定版本:0.1.0
Composer 安装命令:
composer require farmpublic/daplos-parser-bundle
包简介
A Symfony bundle to parse Daplos flat files.
README 文档
README
A Symfony bundle to parse Daplos flat files.
Requirements
- PHP 8.3+
- Symfony 7.1+
- Composer
Installation
composer require farmpublic/daplos-parser-bundle
Usage
To use our bundle, you need to import FarmPublic\DaplosParserBundle\DaplosParserInterface in your controller/service/etc.
- In a controller:
use FarmPublic\DaplosParserBundle\DaplosParserInterface; class MyController { public function myAction(DaplosParserInterface $daplosParser) { $daplosParser->parse('/path/to/file.dap'); } }
- In a service:
use FarmPublic\DaplosParserBundle\DaplosParserInterface; class MyService { public function __construct( private DaplosParserInterface $daplosParser ) { } public function myAction() { $daplosParser->parse('/path/to/file.dap'); } }
- In a command:
use FarmPublic\DaplosParserBundle\DaplosParserInterface; class MyCommand extends Command { public function __construct( private DaplosParserInterface $daplosParser ) { } protected function execute(InputInterface $input, OutputInterface $output): int { $daplosParser->parse('/path/to/file.dap'); } }
Testing
To run the phpunit, phpstan and php-cs-fixer tests, run:
composer test:all
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Authors
- Yoan Bernabeu - Initial work - GitHub
See also the list of contributors who participated in this project.
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-09-27