inspirum/balikobot-symfony
最新稳定版本:v1.3.0
Composer 安装命令:
composer require inspirum/balikobot-symfony
包简介
Symfony bundle for inspirum/balikobot library
README 文档
README
Symfony integration for inspirum/balikobot.
Installation
Run composer require command:
composer require inspirum/balikobot-symfony
Enable bundle by adding it to the list of registered bundles in the config/bundles.php file of your project:
<?php return [ // ... Inspirum\Balikobot\Integration\Symfony\BalikobotBundle::class => ['all' => true], ];
Configure client credentials by adding config/packages/balikobot.yaml and setting the env variables:
balikobot: connections: default: api_user: '%env(resolve:BALIKOBOT_API_USER)%' api_key: '%env(resolve:BALIKOBOT_API_KEY)%'
You can use multiple client credentials
balikobot: default_connection: 'client2' connections: client1: api_user: '%env(resolve:BALIKOBOT_API_USER_1)%' api_key: '%env(resolve:BALIKOBOT_API_KEY_1)%' client2: api_user: '%env(resolve:BALIKOBOT_API_USER_2)%' api_key: '%env(resolve:BALIKOBOT_API_KEY_2)%' client3: api_user: '%env(resolve:BALIKOBOT_API_USER_3)%' api_key: '%env(resolve:BALIKOBOT_API_KEY_3)%'
Usage
Use ServiceContainerRegistry to get ServiceContainer for given connection.
/** @var Inspirum\Balikobot\Service\Registry\ServiceContainerRegistry $registry */ // get package service for default (or first) connection $packageService = $registry->get()->getPackageService(); // get branch service for "client3" connection $packageService = $registry->get('client3')->getBranchService();
or use services directly for default connection
/** @var Inspirum\Balikobot\Service\PackageService $packageService */ $packageService->addPackages(...) /** @var Inspirum\Balikobot\Service\BranchService $branchService */ $branchService->getBranches(...)
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email tomas.novotny@inspirum.cz instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 10.57k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-08-19