예제 #1
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('TGetRuntimeProfileReq');
     if ($this->operationHandle !== null) {
         if (!is_object($this->operationHandle)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('operationHandle', TType::STRUCT, 1);
         $xfer += $this->operationHandle->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->sessionHandle !== null) {
         if (!is_object($this->sessionHandle)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('sessionHandle', TType::STRUCT, 2);
         $xfer += $this->sessionHandle->write($output);
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }
예제 #2
0
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('TRenewDelegationTokenReq');
     if ($this->sessionHandle !== null) {
         if (!is_object($this->sessionHandle)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('sessionHandle', TType::STRUCT, 1);
         $xfer += $this->sessionHandle->write($output);
         $xfer += $output->writeFieldEnd();
     }
     if ($this->delegationToken !== null) {
         $xfer += $output->writeFieldBegin('delegationToken', TType::STRING, 2);
         $xfer += $output->writeString($this->delegationToken);
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }