farmpublic/daplos-parser-bundle

用于解析 Daplos 平面文件的 Symfony 扩展包。

安装: 0

依赖: 0

建议: 0

安全性: 0

星标: 0

关注者: 0

分支: 0

开放问题: 0

类型:symfony-bundle

0.1.0 2024-09-27 13:51 UTC

This package is auto-updated.

Last update: 2024-09-27 14:37:04 UTC


README

Static code analysis Testing emoji-log

用于解析 Daplos 平面文件的 Symfony 扩展包。

要求

  • PHP 8.3+
  • Symfony 7.1+
  • Composer

安装

composer require farmpublic/daplos-parser-bundle

使用方法

要使用我们的扩展包,您需要在控制器/服务/等地方导入 FarmPublic\DaplosParserBundle\DaplosParserInterface

  • 在控制器中
use FarmPublic\DaplosParserBundle\DaplosParserInterface;

class MyController
{
    public function myAction(DaplosParserInterface $daplosParser)
    {
        $daplosParser->parse('/path/to/file.dap');
    }
}
  • 在服务中
use FarmPublic\DaplosParserBundle\DaplosParserInterface;

class MyService
{
    public function __construct(
        private DaplosParserInterface $daplosParser
    ) {
    }

    public function myAction()
    {
        $daplosParser->parse('/path/to/file.dap');
    }
}
  • 在命令中
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');
    }
}

测试

要运行 phpunitphpstanphp-cs-fixer 测试,请执行

composer test:all

许可证

本项目采用 MIT 许可证 - 详细信息请参阅 LICENSE 文件。

贡献

请阅读 CONTRIBUTING.md 了解我们的行为准则和向本项目提交拉取请求的流程。

版本控制

我们使用 SemVer 进行版本控制。有关可用的版本,请参阅本仓库的 标签

作者

  • Yoan Bernabeu - 初始工作 - GitHub

请参阅参与此项目的 贡献者列表