/** * 载入thrift生成的客户端文件 * @deprecated [<version>] [<description>] * @throws \Exception * @return void */ protected function includeFile() { // 载入该服务下的所有文件 $service_dir = ThriftClient::getServiceDir($this->serviceName); foreach (glob($service_dir . '/*.php') as $php_file) { require_once $php_file; } return $service_dir; }
function GetWorkSurfIdListByForeignKey($fkey, $id) { $_return = array(); try { $service_client = new ThriftClient('\\cbm\\CbmServiceClient', HOST, PORT2); $client = $service_client->getClient(); $_return = $client->GetWorkSurfIdListByForeignKey($fkey, intval($id)); } catch (TException $tx) { print 'TException: ' . $tx->getMessage() . "\n"; $_return = array(); } return $_return; }