powerkernel/yii-aws-sns

为 Yii 的 Amazon Simple Notification Service

安装: 881

依赖者: 0

建议者: 0

安全: 0

星标: 1

关注者: 2

分支: 0

开放问题: 1

类型:yii-extension

1.0.0 2018-05-31 11:46 UTC

This package is auto-updated.

Last update: 2024-09-17 00:01:10 UTC


README

为 Yii 3.0 的 Amazon Simple Notification Service

Latest Stable Version Total Downloads GitHub license

安装

安装此扩展的首选方式是通过 composer

可以运行

composer require powerkernel/yii-aws-sns "*"

或者在您的 composer.json 文件的 require 部分添加

"powerkernel/yii-aws-sns": "*"

to

使用

要使用此扩展,只需在您的应用程序配置中添加以下代码

'components' => [
// ...
'sns' => [
            '__class' => powerkernel\sns\AwsSns::class,
            'key' => 'your aws sns key',
            'secret' => 'your aws sns secret',
        ],
// ...        
], 

然后您可以按照以下方式调用 AWS SNS 函数

Yii::$app->sns->client->publish($arg);
// ...

有关进一步说明,请参阅 AWS 文档页面