當前位置: 首頁>>代碼示例>>PHP>>正文


PHP thrift_protocol_read_binary函數代碼示例

本文整理匯總了PHP中thrift_protocol_read_binary函數的典型用法代碼示例。如果您正苦於以下問題:PHP thrift_protocol_read_binary函數的具體用法?PHP thrift_protocol_read_binary怎麽用?PHP thrift_protocol_read_binary使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了thrift_protocol_read_binary函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: recv_healthPoke

 public function recv_healthPoke()
 {
     $bin_accel = $this->input_ instanceof TBinaryProtocolAccelerated && function_exists('thrift_protocol_read_binary');
     if ($bin_accel) {
         $result = thrift_protocol_read_binary($this->input_, '\\RedRoma\\Aroma\\Endpoint\\ApplicationEndpoint_healthPoke_result', $this->input_->isStrictRead());
     } else {
         $rseqid = 0;
         $fname = null;
         $mtype = 0;
         $this->input_->readMessageBegin($fname, $mtype, $rseqid);
         if ($mtype == TMessageType::EXCEPTION) {
             $x = new TApplicationException();
             $x->read($this->input_);
             $this->input_->readMessageEnd();
             throw $x;
         }
         $result = new \RedRoma\Aroma\Endpoint\ApplicationEndpoint_healthPoke_result();
         $result->read($this->input_);
         $this->input_->readMessageEnd();
     }
     if ($result->success !== null) {
         return $result->success;
     }
     if ($result->ex1 !== null) {
         throw $result->ex1;
     }
     throw new \Exception("healthPoke failed: unknown result");
 }
開發者ID:RedRoma,項目名稱:aroma-thrift,代碼行數:28,代碼來源:ApplicationEndpoint.php

示例2: recv_UpdateState

 public function recv_UpdateState()
 {
     $bin_accel = $this->input_ instanceof TBinaryProtocolAccelerated && function_exists('thrift_protocol_read_binary');
     if ($bin_accel) {
         $result = thrift_protocol_read_binary($this->input_, '\\Impala\\StateStoreSubscriber_UpdateState_result', $this->input_->isStrictRead());
     } else {
         $rseqid = 0;
         $fname = null;
         $mtype = 0;
         $this->input_->readMessageBegin($fname, $mtype, $rseqid);
         if ($mtype == TMessageType::EXCEPTION) {
             $x = new TApplicationException();
             $x->read($this->input_);
             $this->input_->readMessageEnd();
             throw $x;
         }
         $result = new \Impala\StateStoreSubscriber_UpdateState_result();
         $result->read($this->input_);
         $this->input_->readMessageEnd();
     }
     if ($result->success !== null) {
         return $result->success;
     }
     throw new \Exception("UpdateState failed: unknown result");
 }
開發者ID:pozypakya,項目名稱:php-impala,代碼行數:25,代碼來源:StateStoreSubscriber.php

示例3: recv_Report

 public function recv_Report()
 {
     $bin_accel = $this->input_ instanceof TBinaryProtocolAccelerated && function_exists('thrift_protocol_read_binary');
     if ($bin_accel) {
         $result = thrift_protocol_read_binary($this->input_, '\\CroutonThrift\\ReportingService_Report_result', $this->input_->isStrictRead());
     } else {
         $rseqid = 0;
         $fname = null;
         $mtype = 0;
         $this->input_->readMessageBegin($fname, $mtype, $rseqid);
         if ($mtype == TMessageType::EXCEPTION) {
             $x = new TApplicationException();
             $x->read($this->input_);
             $this->input_->readMessageEnd();
             throw $x;
         }
         $result = new \CroutonThrift\ReportingService_Report_result();
         $result->read($this->input_);
         $this->input_->readMessageEnd();
     }
     if ($result->success !== null) {
         return $result->success;
     }
     throw new \Exception("Report failed: unknown result");
 }
開發者ID:lightstep,項目名稱:lightstep-tracer-php,代碼行數:25,代碼來源:ReportingService.php

示例4: recv_Log

 public function recv_Log()
 {
     $bin_accel = $this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED && function_exists('thrift_protocol_read_binary');
     if ($bin_accel) {
         $result = thrift_protocol_read_binary($this->input_, 'scribe_Log_result', $this->input_->isStrictRead());
     } else {
         $rseqid = 0;
         $fname = null;
         $mtype = 0;
         $this->input_->readMessageBegin($fname, $mtype, $rseqid);
         if ($mtype == TMessageType::EXCEPTION) {
             $x = new TApplicationException();
             $x->read($this->input_);
             $this->input_->readMessageEnd();
             throw $x;
         }
         $result = new scribe_Log_result();
         $result->read($this->input_);
         $this->input_->readMessageEnd();
     }
     if ($result->success !== null) {
         return $result->success;
     }
     throw new Exception("Log failed: unknown result");
 }
開發者ID:utcuong3010,項目名稱:vng,代碼行數:25,代碼來源:scribe.php

示例5: test

function test()
{
    $p = new DummyProtocol();
    $v1 = new TestStruct();
    $v1->aString = str_repeat('x', 1000000);
    thrift_protocol_write_binary($p, 'foomethod', 1, $v1, 20, true);
    $p->getTransport()->buff = str_replace(pack('N', 1000000), pack('N', (1 << 32) - 2), $p->getTransport()->buff);
    thrift_protocol_read_binary($p, 'TestStruct', true);
}
開發者ID:badlamer,項目名稱:hhvm,代碼行數:9,代碼來源:thrift.php

示例6: deserialize

 public static function deserialize($str, $object, $disable_hphp_extension = false)
 {
     $transport = new TMemoryBuffer();
     $protocol = new TBinaryProtocolAccelerated($transport);
     if (\hacklib_cast_as_boolean(function_exists('thrift_protocol_read_binary')) && !\hacklib_cast_as_boolean($disable_hphp_extension)) {
         $protocol->writeMessageBegin('', TMessageType::REPLY, 0);
         $transport->write($str);
         $object = thrift_protocol_read_binary($protocol, get_class($object), $protocol->isStrictRead());
     } else {
         $transport->write($str);
         $object->read($protocol);
     }
     return $object;
 }
開發者ID:pandasasa,項目名稱:fbthrift,代碼行數:14,代碼來源:TBinarySerializer.php

示例7: deserialize

 public static function deserialize($string_object, $class_name)
 {
     $transport = new TMemoryBuffer();
     $protocol = new TBinaryProtocolAccelerated($transport);
     if (function_exists('thrift_protocol_read_binary')) {
         $protocol->writeMessageBegin('', TMessageType::REPLY, 0);
         $transport->write($string_object);
         return thrift_protocol_read_binary($protocol, $class_name, $protocol->isStrictRead());
     } else {
         $transport->write($string_object);
         $object = new $class_name();
         $object->read($protocol);
         return $object;
     }
 }
開發者ID:bibhutibhusan89,項目名稱:Impala,代碼行數:15,代碼來源:TBinarySerializer.php

示例8: test

function test()
{
    $p = new DummyProtocol();
    $v1 = new TestStruct();
    $v1->aBool = false;
    $v1->anInt = -1234;
    $v1->aDouble = -1.2345;
    $v1->anInt64 = -1;
    $v1->anByte = -12;
    $v1->anI16 = -123;
    $v1->aFloat = 1.25;
    $v1->bFloat = 3.141592653589793;
    thrift_protocol_write_binary($p, 'foomethod', 1, $v1, 20, true);
    var_dump(thrift_protocol_read_binary($p, 'TestStruct', true));
}
開發者ID:badlamer,項目名稱:hhvm,代碼行數:15,代碼來源:1557.php

示例9: deserialize

 public static function deserialize($string_object, $class_name)
 {
     $transport = new TMemoryBuffer();
     $protocol = new TBinaryProtocolAccelerated($transport);
     if (function_exists('thrift_protocol_read_binary')) {
         // NOTE (t.heintz) TBinaryProtocolAccelerated internally wraps our TMemoryBuffer in a
         // TBufferedTransport, so we have to retrieve it again or risk losing data when writing
         // less than 512 bytes to the transport (see the comment there as well).
         // @see THRIFT-1579
         $protocol->writeMessageBegin('', TMessageType::REPLY, 0);
         $protocolTransport = $protocol->getTransport();
         $protocolTransport->write($string_object);
         $protocolTransport->flush();
         return thrift_protocol_read_binary($protocol, $class_name, $protocol->isStrictRead());
     } else {
         $transport->write($string_object);
         $object = new $class_name();
         $object->read($protocol);
         return $object;
     }
 }
開發者ID:junerain,項目名稱:thrift,代碼行數:21,代碼來源:TBinarySerializer.php

示例10: recv_close

 public function recv_close()
 {
     $bin_accel = $this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED && function_exists('thrift_protocol_read_binary');
     if ($bin_accel) {
         $result = thrift_protocol_read_binary($this->input_, '\\ICANS\\Component\\IcansLoggingComponent\\Flume\\ThriftFlumeEventServer_close_result', $this->input_->isStrictRead());
     } else {
         $rseqid = 0;
         $fname = null;
         $mtype = 0;
         $this->input_->readMessageBegin($fname, $mtype, $rseqid);
         if ($mtype == TMessageType::EXCEPTION) {
             $x = new TApplicationException();
             $x->read($this->input_);
             $this->input_->readMessageEnd();
             throw $x;
         }
         $result = new \ICANS\Component\IcansLoggingComponent\Flume\ThriftFlumeEventServer_close_result();
         $result->read($this->input_);
         $this->input_->readMessageEnd();
     }
     return;
 }
開發者ID:xietongling,項目名稱:IcansLoggingComponent,代碼行數:22,代碼來源:ThriftFlumeEventServerClient.php

示例11: recv_ShutdownServer

 public function recv_ShutdownServer()
 {
     $bin_accel = $this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED && function_exists('thrift_protocol_read_binary');
     if ($bin_accel) {
         $result = thrift_protocol_read_binary($this->input_, '\\ImpalaPlanService_ShutdownServer_result', $this->input_->isStrictRead());
     } else {
         $rseqid = 0;
         $fname = null;
         $mtype = 0;
         $this->input_->readMessageBegin($fname, $mtype, $rseqid);
         if ($mtype == TMessageType::EXCEPTION) {
             $x = new TApplicationException();
             $x->read($this->input_);
             $this->input_->readMessageEnd();
             throw $x;
         }
         $result = new \ImpalaPlanService_ShutdownServer_result();
         $result->read($this->input_);
         $this->input_->readMessageEnd();
     }
     return;
 }
開發者ID:pozypakya,項目名稱:php_impala_phar,代碼行數:22,代碼來源:ImpalaPlanService.php

示例12: recv_hql_query2

 public function recv_hql_query2()
 {
     $bin_accel = $this->input_ instanceof TBinaryProtocolAccelerated && function_exists('thrift_protocol_read_binary');
     if ($bin_accel) {
         $result = thrift_protocol_read_binary($this->input_, '\\Hypertable_ThriftGen2\\HqlService_hql_query2_result', $this->input_->isStrictRead());
     } else {
         $rseqid = 0;
         $fname = null;
         $mtype = 0;
         $this->input_->readMessageBegin($fname, $mtype, $rseqid);
         if ($mtype == TMessageType::EXCEPTION) {
             $x = new TApplicationException();
             $x->read($this->input_);
             $this->input_->readMessageEnd();
             throw $x;
         }
         $result = new \Hypertable_ThriftGen2\HqlService_hql_query2_result();
         $result->read($this->input_);
         $this->input_->readMessageEnd();
     }
     if ($result->success !== null) {
         return $result->success;
     }
     if ($result->e !== null) {
         throw $result->e;
     }
     throw new \Exception("hql_query2 failed: unknown result");
 }
開發者ID:covertcodeop,項目名稱:hypertable,代碼行數:28,代碼來源:HqlService.php

示例13: recv_clean

 public function recv_clean()
 {
     $bin_accel = $this->input_ instanceof TBinaryProtocolAccelerated && function_exists('thrift_protocol_read_binary');
     if ($bin_accel) {
         $result = thrift_protocol_read_binary($this->input_, '\\ThriftHive_clean_result', $this->input_->isStrictRead());
     } else {
         $rseqid = 0;
         $fname = null;
         $mtype = 0;
         $this->input_->readMessageBegin($fname, $mtype, $rseqid);
         if ($mtype == TMessageType::EXCEPTION) {
             $x = new TApplicationException();
             $x->read($this->input_);
             $this->input_->readMessageEnd();
             throw $x;
         }
         $result = new \ThriftHive_clean_result();
         $result->read($this->input_);
         $this->input_->readMessageEnd();
     }
     return;
 }
開發者ID:priyanshu-sekhar,項目名稱:hive,代碼行數:22,代碼來源:ThriftHive.php

示例14: recv_getCardRechargeList

 public function recv_getCardRechargeList()
 {
     $bin_accel = $this->input_ instanceof TBinaryProtocolAccelerated && function_exists('thrift_protocol_read_binary');
     if ($bin_accel) {
         $result = thrift_protocol_read_binary($this->input_, '\\Thrift\\Server\\CardCenterService_getCardRechargeList_result', $this->input_->isStrictRead());
     } else {
         $rseqid = 0;
         $fname = null;
         $mtype = 0;
         $this->input_->readMessageBegin($fname, $mtype, $rseqid);
         if ($mtype == TMessageType::EXCEPTION) {
             $x = new TApplicationException();
             $x->read($this->input_);
             $this->input_->readMessageEnd();
             throw $x;
         }
         $result = new \Thrift\Server\CardCenterService_getCardRechargeList_result();
         $result->read($this->input_);
         $this->input_->readMessageEnd();
     }
     if ($result->success !== null) {
         return $result->success;
     }
     if ($result->dataNotFound !== null) {
         throw $result->dataNotFound;
     }
     throw new \Exception("getCardRechargeList failed: unknown result");
 }
開發者ID:xiaoyueer98,項目名稱:app.heimi.com,代碼行數:28,代碼來源:CardCenterServiceClient.php

示例15: recv_getAllUserSSHPubKeys

 public function recv_getAllUserSSHPubKeys()
 {
     $bin_accel = $this->input_ instanceof TBinaryProtocolAccelerated && function_exists('thrift_protocol_read_binary');
     if ($bin_accel) {
         $result = thrift_protocol_read_binary($this->input_, '\\Airavata\\API\\Credentials\\CredentialManagementService_getAllUserSSHPubKeys_result', $this->input_->isStrictRead());
     } else {
         $rseqid = 0;
         $fname = null;
         $mtype = 0;
         $this->input_->readMessageBegin($fname, $mtype, $rseqid);
         if ($mtype == TMessageType::EXCEPTION) {
             $x = new TApplicationException();
             $x->read($this->input_);
             $this->input_->readMessageEnd();
             throw $x;
         }
         $result = new \Airavata\API\Credentials\CredentialManagementService_getAllUserSSHPubKeys_result();
         $result->read($this->input_);
         $this->input_->readMessageEnd();
     }
     if ($result->success !== null) {
         return $result->success;
     }
     throw new \Exception("getAllUserSSHPubKeys failed: unknown result");
 }
開發者ID:kidaak,項目名稱:airavata-sandbox,代碼行數:25,代碼來源:CredentialManagementService.php


注:本文中的thrift_protocol_read_binary函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。