flosch/messagebird-bundle
Composer 安装命令:
composer require flosch/messagebird-bundle
包简介
Symfony 3 bundle to easily integrate MessageBird SDK into a Symfony project.
README 文档
README
A symfony 3 integration for the MessageBird PHP SDK
This bundle allow you to manipulate the MessageBird SDK as a Symfony service.
Installation
To install this bundle, run the command below and you will get the latest version from Packagist.
composer require flosch/messagebird-bundle
Load required bundles in AppKernel.php:
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// [...]
new Flosch\Bundle\MessageBirdBundle\FloschMessageBirdBundle()
);
}
And set-up the required configuration
# app/config/config.yml
flosch_message_bird:
api_key: "xxxxxxxxxxxxxxxxx" # The MessageBird API key can be added as a symfony parameter
Usage
Then, it is possible to use this service from inside a controller
$messageBirdClient = $this->get('flosch.message_bird.client');
The MessageBirdClient php class extends the default MessageBird PHP SDK class, allowing you to do anything that this SDK can do. Plus, it will automatically be authenticated with your MessageBird API Key, which you do not have to worry about at all.
统计信息
- 总下载量: 1.3k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-02-03