2017 © Pedro Peláez
 

yii2-extension yii2-qcloud

The qcloud extension for the yii framework

image

xutl/yii2-qcloud

The qcloud extension for the yii framework

  • Thursday, February 1, 2018
  • by xutl
  • Repository
  • 0 Watchers
  • 4 Stars
  • 3,093 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 8 Versions
  • 47 % Grown

The README.md

yii2-qcloud

适用于Yii2的腾讯云API接口类。, (*1)

支持操控的接口

直接支持

  • [x] CDN 内容分发网络
  • [x] DNS 云解析
  • [x] CMQ 消息队列
  • [x] CLB 负载均衡
  • [x] TIM 云通信
  • [x] Api网关

间接支持

  • [x] CVM 云服务器
  • [x] CPM 黑石物理服务器
  • [x] AS 弹性伸缩
  • [x] CCS 容器服务
  • [x] VPC 私有网络
  • [x] 其他使用同类通信加密解析协议的接口都支持。

## Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist xutl/yii2-qcloud

or add, (*4)

"xutl/yii2-qcloud": "~3.0.0"

to the require section of your composer.json file., (*5)

配置

To use this extension, you have to configure the Connection class in your application configuration:, (*6)

return [
    //....
    'components' => [
        'api' => [
            'class' => 'xutl\qcloud\ApiGateway',//注意,绑定secretId、secretKey的接口一定要绑定使用计划,并且把使用计划指定给secretId
            'baseUrl' => 'http://service-xxxxxxx.ap-shanghai.apigateway.myqcloud.com/test',
            'secretId' => 'asdfasdfk;lasdf',
            'secretKey' => '123123123',
            //注:使用方式同 YII2 自带的 httpclient 一致,这里只是封装了一下Header
        ],
        'qcloud' => [
            'class' => 'xutl\qcloud\Qcloud',
            'secretId' => 'abcdefg',
            'secretKey' => 'abcdefg',
            'params'=> [//这里是非扩展的配置参数,如队列任务等
                'aaa.appvvvKey' => 123456789
            ],
            'components' => [
               //各子组件配置,如果无需配置不写即可。也可动态注入配置。
               //如果子组件使用独立的 `secretId` 和 `secretKey` 那么在子组件中单独配置即可,如果没有配置默认使用父  `accessId` 和 `accessKey` 。
               //如果你自己扩展了其他的子组件,这里定义下新的组件配置即可,配置方式,数组接口和 YII 原生组件一致!
              //etc
            ]
        ],
    ]
];

使用

$cdn = Yii::$app->qcloud->cdn;
$response = $cdn->describeCdnHosts();
print_r($response->data);

资源

The Versions

01/02 2018

dev-master

9999999-dev

The qcloud extension for the yii framework

  Sources   Download

MIT

The Requires

 

yii2 yii qcloud

01/02 2018

3.0.2

3.0.2.0

The qcloud extension for the yii framework

  Sources   Download

MIT

The Requires

 

yii2 yii qcloud

01/02 2018

3.0.1

3.0.1.0

The qcloud extension for the yii framework

  Sources   Download

MIT

The Requires

 

yii2 yii qcloud

26/01 2018

3.0.0

3.0.0.0

The qcloud extension for the yii framework

  Sources   Download

MIT

The Requires

 

yii2 yii qcloud

06/11 2017

2.0.x-dev

2.0.9999999.9999999-dev

The qcloud extension for the yii framework

  Sources   Download

MIT

The Requires

 

yii2 yii qcloud

06/11 2017

2.0.0

2.0.0.0

The qcloud extension for the yii framework

  Sources   Download

MIT

The Requires

 

yii2 yii qcloud

31/08 2017

1.0.x-dev

1.0.9999999.9999999-dev

The qcloud extension for the yii framework

  Sources   Download

MIT

The Requires

 

yii2 yii qcloud

23/09 2016

1.0.0

1.0.0.0

The qcloud extension for the yii framework

  Sources   Download

MIT

The Requires

 

yii2 yii qcloud