2017 © Pedro Peláez
 

yii2-extension yii2-thrift

yii2 extension for thrift

image

tengpao/yii2-thrift

yii2 extension for thrift

  • Wednesday, June 22, 2016
  • by tengpao
  • Repository
  • 1 Watchers
  • 2 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

yii2-thrift

yii2 extension for thrift, (*1)

安装

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

composer require --prefer-dist tengpao/yii2-thrift "*"

or add, (*3)

"tengpao/yii2-thrift": "*"

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

使用

在配置文件中components中增加配置:, (*5)

'thrift' => [
    'class' => 'tengpao\thrift\ThriftClient'
    'idService' => [
        'defineName' => 'shared',
        'clientName' => '\tutorial\CalculatorClient'
    ],
]

调用:, (*6)

\Yii::$app->thrift->idService->method();

如果不想在配置文件中全局配置,可以使用, (*7)

$thrift = \Yii::createObject([
    'class' => 'tengpao\thrift\ThriftClient'
    'idService' => [
        'defineName' => 'shared',
        'clientName' => '\tutorial\CalculatorClient'
    ],
]);

$thrift->idService->method();

注,如果不是通过composer安装的需要添加相关别名指向, (*8)

QQ交流群: 325914002, (*9)

The Versions

22/06 2016

dev-master

9999999-dev

yii2 extension for thrift

  Sources   Download

BSD-3-Clause

The Requires

 

by Avatar tengpao

extension yii2 thrift