2017 © Pedro Peláez
 

library yii2-thrift

Thrift server application using Yii2

image

urbanindo/yii2-thrift

Thrift server application using Yii2

  • Wednesday, May 2, 2018
  • by urbanindo
  • Repository
  • 5 Watchers
  • 9 Stars
  • 7,184 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 8 Forks
  • 1 Open issues
  • 7 Versions
  • 22 % Grown

The README.md

yii2-thrift

Thrift extension for Yii2, (*1)

Latest Stable Version Total Downloads Latest Unstable Version Build Status, (*2)

Installation

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

Either run, (*4)

php composer.phar require --prefer-dist urbanindo/yii2-thrift "*"

or add, (*5)

"urbanindo/yii2-thrift": "*"

Minimum Requirement

  • Thrift version 0.10.0. To install thrift, check http://thrift.apache.org/download
  • Yii 2.0.0

Usage

Put the thrift file into some directory thrift in the root is preferable., (*6)

Generate the thrift file using command below., (*7)

thrift --gen php:server,oop path/to/the/thrift/file

In the index.php instead of using the default yii\web\Application use UrbanIndo\Yii2\Thrift\Application., (*8)

In the component configuration add the thrift configuration., (*9)

return [
    'component' => [
        'thrift' => [
            'serviceMap' => [
                '' => 'service'
            ]
        ]
    ]
]

Create a service in the services directory, similar to controllers. This should implement both the Interface from generated Thrift file and UrbanIndo\Yii2\Thrift\Service interface., (*10)

class HelloService implements \myservice\HelloServiceIf, \UrbanIndo\Yii2\Thrift\Service {

    public function getProcessorClass {
        return 'myservice\HelloServiceProcessor';
    }
}

The Versions

20/04 2018

dev-fix-header-already-sent

dev-fix-header-already-sent

Thrift server application using Yii2

  Sources   Download

MIT

The Requires

 

The Development Requires

by Petra Barus

14/09 2015

v1.0

1.0.0.0

Thrift server application using Yii2

  Sources   Download

GPL

The Requires

 

by Petra Barus