コード例 #1
0
ファイル: Types.php プロジェクト: prongs/apache-hive
 public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'sessionHandle', 'type' => TType::STRUCT, 'class' => '\\TSessionHandle'), 2 => array('var' => 'delegationToken', 'type' => TType::STRING));
     }
     if (is_array($vals)) {
         if (isset($vals['sessionHandle'])) {
             $this->sessionHandle = $vals['sessionHandle'];
         }
         if (isset($vals['delegationToken'])) {
             $this->delegationToken = $vals['delegationToken'];
         }
     }
 }
コード例 #2
0
ファイル: TCLIService.php プロジェクト: zhaorongsheng/hive
 public function write($output)
 {
     $xfer = 0;
     $xfer += $output->writeStructBegin('TCLIService_RenewDelegationToken_args');
     if ($this->req !== null) {
         if (!is_object($this->req)) {
             throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
         }
         $xfer += $output->writeFieldBegin('req', TType::STRUCT, 1);
         $xfer += $this->req->write($output);
         $xfer += $output->writeFieldEnd();
     }
     $xfer += $output->writeFieldStop();
     $xfer += $output->writeStructEnd();
     return $xfer;
 }