eleme / thrift-silex
为silex框架提供thrift服务
v0.1.2
2014-09-28 09:02 UTC
Requires
- php: >=5.3.3
- eleme/thrift-php: ~0.9
Requires (Dev)
- phpunit/phpunit: ~4.0
- silex/silex: ~1.1
This package is not auto-updated.
Last update: 2024-09-24 01:46:11 UTC
README
为silex框架提供thrift服务。
使用Composer安装
"require": { "eleme/thrift-silex": "~0.1" }
示例
use Silex\Application; use Eleme\Thrift\Provider\Silex\ThriftServiceProvider; $app = new Application; $app->register(new ThriftServiceProvider); $app['thrift.options'] = array( 'foo' => array( 'server' => 'foo_host', 'port' => 12345, 'client' => 'FooClient' ), 'bar' => array( 'server' => 'bar_host', 'port' => 12346, 'client' => 'BarClient' ), ); $app['thrift.clients']['foo']->api(); $app['thrift.clients']['bar']->api();