fatpanda-gmbh / bexio-connector-bundle
此包封装了fatpanda-gmbh/bexio-connector库,用于symfony应用程序
0.1.1
2020-06-02 21:20 UTC
Requires
- php: >=7.1
- fatpanda-gmbh/bexio-connector: ^0.1.1
- symfony/framework-bundle: ^3.4 || ^4.2 || ^5.0
This package is auto-updated.
Last update: 2024-09-29 05:48:48 UTC
README
一个封装Bexio Connector库的Symfony包。
配置
添加到composer.json
composer require fatpanda-gmbh/bexio-connector-bundle
然后在您的内核中启用它
// app/AppKernel.php public function registerBundles() { $bundles = array( //... new Fatpanda\BexioConnectorBundle\BexioConnectorBundle(), //...
使用方法
此包注册了bexio_connector
服务。要使用它,您需要一个有效的Bexio API令牌,您可以在https://office.bexio.com/index.php/admin/apiTokens#/生成
app.service.bexio: class: AppBundle\Service\BexioService arguments: $connector: '@bexio_connector' $token: %token%
use Fatpanda\BexioConnector\BexioConnector; class BexioService { /** * @var BexioConnector */ private $connector; public function __construct(BexioConnector $connector, string $token) { $this->connector = $connector; $this->connector->setToken($token); } public function getContactsList() { $this->connector->getContactsList(); } }
许可证
此包遵循MIT许可证。请参阅包中的完整许可证。
Resources/meta/LICENSE