Commit 2ab88f78 authored by tufengqi's avatar tufengqi

格式化代码

parent a7f959fd
......@@ -101,7 +101,7 @@ class TCurlClient extends \Thrift\Transport\TTransport
*/
public function __construct($host, $port = 80, $uri_no_func = '', $scheme = 'http')
{
if ((TStringFuncFactory::create()->strlen($uri_no_func) > 0) && ($uri_no_func {
if ((TStringFuncFactory::create()->strlen($uri_no_func) > 0) && ($uri_no_func{
0} != '/')) {
$uri_no_func = '/' . $uri_no_func;
}
......
......@@ -103,7 +103,7 @@ class TGuzzleClient extends \Thrift\Transport\TTransport
*/
public function __construct($host, $port = 80, $uri_no_func = '', $scheme = 'http')
{
if ((TStringFuncFactory::create()->strlen($uri_no_func) > 0) && ($uri_no_func {
if ((TStringFuncFactory::create()->strlen($uri_no_func) > 0) && ($uri_no_func{
0} != '/')) {
$uri_no_func = '/' . $uri_no_func;
}
......
......@@ -99,7 +99,7 @@ class THttpClient extends \Thrift\Transport\TTransport
*/
public function __construct($host, $port = 80, $uri_no_func = '', $scheme = 'http')
{
if ((TStringFuncFactory::create()->strlen($uri_no_func) > 0) && ($uri_no_func {
if ((TStringFuncFactory::create()->strlen($uri_no_func) > 0) && ($uri_no_func{
0} != '/')) {
$uri_no_func = '/' . $uri_no_func;
}
......
<?php
namespace fpf\thrift;
use Thrift\Type\TMessageType;
......@@ -9,6 +10,7 @@ class ThriftAsyncDetailInstanse
private $promise = null;
private $class_name = '';
private $func_name = '';
public function __construct($promise, $protocol, $class_name, $func_name)
{
$this->promise = $promise;
......
......@@ -14,14 +14,9 @@ use Thrift\Factory\TStringFuncFactory;
class ThriftAsyncServiceFactoryProxy
{
private $instance = null;
private $transport = null;
private $socket = null;
private $promise = null;
private $protocol_list = null;
private $request_base_params = null;
private $tem_class_name = '';
private $class_name = '';
private $func_name = '';
const BINARY = 0;
const JSON = 1;
......
......@@ -2,8 +2,6 @@
namespace fpf\thrift;
use fpf\thrift\ThriftAsyncServiceFactoryProxy;
class ThriftServiceFactory
{
......@@ -18,6 +16,7 @@ class ThriftServiceFactory
self::$sync_services[$class_name] = new ThriftServiceFactoryProxy($class_name);
return self::$sync_services[$class_name];
}
public static function getAsyncService($class_name)
{
if (!empty(self::$async_services[$class_name])) {
......
......@@ -18,7 +18,6 @@ class ThriftServiceFactoryProxy
{
$service_default_protocol = Yii::$app->fpf->getConfig('service_default_protocol', 'thrift_service');
$service_default_hosts = Yii::$app->fpf->getConfig('service_default_hosts', 'thrift_service');
$service_default_failure_policy = Yii::$app->fpf->getConfig('service_default_failure_policy', 'thrift_service');
$service_module_hosts = Yii::$app->fpf->getConfig('service_module_hosts', 'thrift_service');
$check_ret = $this->checkService($class_name);
if (true === $check_ret[BaseConstant::ERROR]) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment