crowdreactive / lob-bundle
Lob.com PHP SDK 的 Symfony 扩展包
2.0.0
2016-02-11 12:49 UTC
Requires
- php: ^5.5|^7.0
- lob/lob-php: ~1.6
- symfony/framework-bundle: ^2.6|^3.0
Requires (Dev)
- fabpot/php-cs-fixer: ^1.11
- phpunit/phpunit: ^4.8
This package is not auto-updated.
Last update: 2024-09-14 18:58:36 UTC
README
封装了 Lob.com 的 PHP SDK,以配置 Symfony 扩展包。
由 CrowdReactive 提供,CrowdReactive 是 EventsTag 的制作者。
使用方法
-
安装扩展包
composer require crowdreactive/lob-bundle
-
将其添加到 AppKernel
class AppKernel { public function registerBundles() { $bundles = [ new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), // ... new CrowdReactive\LobBundle\CrowdReactiveLobBundle(), ]; } }
-
配置
crowd_reactive_lob: # Required api_key: abc123 # Optional version: 1.5.0 # A specific version of the API
-
访问 Lob 服务
Lob\Lob
实例在依赖容器中名为crowd_reactive_lob.lob
。使用以下方式访问它:$this->container->get('crowd_reactive_lob.lob');
my_postal_service: class: My\PostalService arguments: - "@crowd_reactive_lob.lob"
贡献
欢迎 PR!确保使用 composer run tests
运行测试。
许可证
此扩展包受 MIT 许可证保护。 查看完整的许可证。