alexeevdv / carrot-quest-yii2-client
carrot-quest-php-client 的 Yii2 组件
0.1.0
2019-12-14 11:06 UTC
Requires
- php: >=7.1
- alexeevdv/carrot-quest-php-client: ^0.1
- yiisoft/yii2: ^2.0
Requires (Dev)
This package is auto-updated.
Last update: 2024-09-14 21:54:43 UTC
README
carrot-quest-php-client 的 Yii2 组件
安装
安装此扩展的首选方式是通过 composer.
运行以下命令之一:
$ php composer.phar require alexeevdv/carrot-quest-yii2-client "^0.1"
或者
"alexeevdv/carrot-quest-yii2-client": "^0.1"
将以下内容添加到您的 composer.json
文件的 require
部分:
配置
[ 'components' => [ 'carrotQuest' => [ 'class' => alexeevdv\yii\CarrotQuest\Client::class, 'authToken' => 'MY_AUTH_TOKEN', ], ], ]
或
[ 'container' => [ 'singletons' => [ alexeevdv\CarrotQuest\ClientInterface::class => [ 'class' => alexeevdv\yii\CarrotQuest\Client::class, 'authToken' => 'MY_AUTH_TOKEN', ], ], ], ]
用法
Yii::$app->carrotQuest->userSetProperties(777, ['$name' => 'John'], false);
方法
有关可用方法的列表,请参阅 https://github.com/alexeevdv/carrot-quest-php-client