Hypertable_ThriftGen_ClientService_next_cells_serialized_result::read PHP Method

read() public method

public read ( $input )
    public function read($input)
    {
        $xfer = 0;
        $fname = null;
        $ftype = 0;
        $fid = 0;
        $xfer += $input->readStructBegin($fname);
        while (true) {
            $xfer += $input->readFieldBegin($fname, $ftype, $fid);
            if ($ftype == TType::STOP) {
                break;
            }
            switch ($fid) {
                case 0:
                    if ($ftype == TType::STRING) {
                        $xfer += $input->readString($this->success);
                    } else {
                        $xfer += $input->skip($ftype);
                    }
                    break;
                default:
                    $xfer += $input->skip($ftype);
                    break;
            }
            $xfer += $input->readFieldEnd();
        }
        $xfer += $input->readStructEnd();
        return $xfer;
    }

Usage Example

コード例 #1
0
ファイル: ClientService.php プロジェクト: kamoljan/hypertable
 public function recv_next_cells_serialized()
 {
     $bin_accel = $this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED && function_exists('thrift_protocol_read_binary');
     if ($bin_accel) {
         $result = thrift_protocol_read_binary($this->input_, 'Hypertable_ThriftGen_ClientService_next_cells_serialized_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_ThriftGen_ClientService_next_cells_serialized_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("next_cells_serialized failed: unknown result");
 }
Hypertable_ThriftGen_ClientService_next_cells_serialized_result